Put renamer.sh and renamer-aux.sh in a folder on your executable path (note that they should both be in the same folder).
Now cd somewhere and run renamer.sh, you'll get a series of mv commands to rename each folder from SOMEFOLDER/ to somefile-AT-somefolder/ where somefile is the name of the first file under somefolder/ (according to filename sort order).
Why would you need this? Beats me. A friend asked for it.
Note: Order does matter. The output you get from renamer.sh may contain (e.g.):
mv "/a/b/c/" "/a/b/something-AT-c"
mv /a/b/" "/a/aomething-AT-b"
mv "/a/" "/something-AT-a"
Doing them out of sequence would break - of course.