{
local cooluser="$1"; shift
+#hmmm: check for non empty name.
+ local homebase="/home/$cooluser"
+
# first build a list of dirs based on their location in /home/archives.
local arch_builder="archons basement codebarn games imaginations musix pooling prewar_toaster stuffing toaster walrus"
local ARCHIVE_TOP=/home/archives
fi
# fix some permissions for important security considerations.
- if [ -d $HOME/.ssh ]; then
- harsh_perm $HOME/.ssh
+ if [ -d $homebase/.ssh ]; then
+ harsh_perm $homebase/.ssh
fi
#hmmm: consider adding feisty meow apex to the dirname list below.
# iterate across the list of dirs we want cooluser to own and change their ownership.
- for dirname in $HOME \
+ for dirname in $homebase \
$DEFAULT_FEISTYMEOW_ORG_DIR \
/usr/local/${cooluser} \
/home/games \
# this runs the cool permission applier on the current user.
if [[ $0 =~ .*cool_permissionator\.sh.* ]]; then
-echo A
THISDIR="$( \cd "$(\dirname "$0")" && /bin/pwd )"
-echo B
export FEISTY_MEOW_APEX="$( \cd "$THISDIR/../.." && \pwd )"
-echo B.2
source "$THISDIR/../core/launch_feisty_meow.sh"
exit_on_error "sourcing the feisty meow launcher"
-echo C
- reapply_cool_permissions $(logname)
- exit_on_error "reapplying cool permissions on $(logname)"
-echo D
+ coolio="$USER"
+ reapply_cool_permissions "$coolio"
+ exit_on_error "reapplying cool permissions on $coolio"
fi