# interesting note perhaps: found that the NETHACKOPTIONS variable was
# not being unset correctly when preceded by an alias. split them up
# like they are now due to that bug.
- unset -v CORE_ALIASES_LOADED FEISTY_MEOW_GENERATED NECHUNG NETHACKOPTIONS
+ unset -v CORE_ALIASES_LOADED FEISTY_MEOW_LOADING_DOCK NECHUNG NETHACKOPTIONS
unset -f function_sentinel
# reload feisty meow environment in current shell.
source $FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh
# use our default example user if there was no name provided.
user=fred
fi
- if [ ! -d "$FEISTY_MEOW_DIR/customizing/$user" ]; then
+ if [ ! -d "$FEISTY_MEOW_APEX/customizing/$user" ]; then
echo "The customization folder provided for $user should be:"
- echo " '$FEISTY_MEOW_DIR/customizing/$user'"
+ echo " '$FEISTY_MEOW_APEX/customizing/$user'"
echo "but that folder does not exist. Skipping customization."
return 1
fi
regenerate >/dev/null
- pushd "$FEISTY_MEOW_GENERATED/custom" &>/dev/null
- local incongruous_files="$(bash "$FEISTY_MEOW_SCRIPTS/files/list_non_dupes.sh" "$FEISTY_MEOW_DIR/customizing/$user" "$FEISTY_MEOW_GENERATED/custom")"
- if [ ${#incongruous_files} -ge 1 ]; then
+ pushd "$FEISTY_MEOW_LOADING_DOCK/custom" &>/dev/null
+ local incongruous_files="$(bash "$FEISTY_MEOW_SCRIPTS/files/list_non_dupes.sh" "$FEISTY_MEOW_APEX/customizing/$user" "$FEISTY_MEOW_LOADING_DOCK/custom")"
+
+#echo "the incongruous files list is: $incongruous_files"
+ # disallow a single character result, since we get "*" as result when nothing exists yet.
+ if [ ${#incongruous_files} -ge 2 ]; then
echo "cleaning unknown older overrides..."
perl "$FEISTY_MEOW_SCRIPTS/files/safedel.pl" $incongruous_files
echo
fi
popd &>/dev/null
echo "copying custom overrides for $user"
- mkdir "$FEISTY_MEOW_GENERATED/custom" 2>/dev/null
- perl "$FEISTY_MEOW_SCRIPTS/text/cpdiff.pl" "$FEISTY_MEOW_DIR/customizing/$user" "$FEISTY_MEOW_GENERATED/custom"
- if [ -d "$FEISTY_MEOW_DIR/customizing/$user/scripts" ]; then
+ mkdir -p "$FEISTY_MEOW_LOADING_DOCK/custom" 2>/dev/null
+ perl "$FEISTY_MEOW_SCRIPTS/text/cpdiff.pl" "$FEISTY_MEOW_APEX/customizing/$user" "$FEISTY_MEOW_LOADING_DOCK/custom"
+ if [ -d "$FEISTY_MEOW_APEX/customizing/$user/scripts" ]; then
echo "copying custom scripts for $user"
- \cp -R "$FEISTY_MEOW_DIR/customizing/$user/scripts" "$FEISTY_MEOW_GENERATED/custom/"
+ \cp -R "$FEISTY_MEOW_APEX/customizing/$user/scripts" "$FEISTY_MEOW_LOADING_DOCK/custom/"
fi
echo
regenerate
# this is done first since some filenames can't be properly renamed in perl (e.g. if they
# have pipe characters apparently).
intermediate_name="$(bash "$FEISTY_MEOW_SCRIPTS/files/replace_spaces_with_underscores.sh" "$arg")"
+ local saw_intermediate_result=0
if [ -z "$intermediate_name" ]; then
# make sure we report something, if there are no further name changes.
intermediate_name="'$arg'"
else
# now zap the first part of the name off (since original name isn't needed).
intermediate_name="$(echo $intermediate_name | sed -e 's/.*=> //')"
+ saw_intermediate_result=1
fi
# first we rename the file to be lower case.
actual_file="$(echo $intermediate_name | sed -e "s/'\([^']*\)'/\1/")"
final_name="$(perl $FEISTY_MEOW_SCRIPTS/files/renlower.pl "$actual_file")"
+ local saw_final_result=0
if [ -z "$final_name" ]; then
- final_name="'$intermediate_name'"
+ final_name="$intermediate_name"
else
final_name="$(echo $final_name | sed -e 's/.*=> //')"
+ saw_final_result=1
fi
+#echo intermed=$saw_intermediate_result
+#echo final=$saw_final_result
- # printout the combined operation results.
- echo "'$arg' => $final_name"
+ if [[ $saw_intermediate_result != 0 || $saw_final_result != 0 ]]; then
+ # printout the combined operation results.
+ echo "'$arg' => $final_name"
+ fi
done
}