cd "$1"
}
+ # displays the value of a variable in bash friendly format.
+ function var() {
+ local varname="$1"; shift
+ if [ -z "${!varname}" ]; then
+ echo "$varname undefined"
+ else
+ echo "$varname=${!varname}"
+ fi
+ }
+
+ function success_sound()
+ {
+ if [ ! -z "$CLAM_FINISH_SOUND" ]; then
+ bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh "$CLAM_FINISH_SOUND"
+ fi
+ }
+
+ function error_sound()
+ {
+ if [ ! -z "$CLAM_ERROR_SOUND" ]; then
+ bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh "$CLAM_ERROR_SOUND"
+ fi
+ }
+
# checks the result of the last command that was run, and if it failed,
# then this complains and exits from bash. the function parameters are
# used as the message to print as a complaint.
{
if [ $? -ne 0 ]; then
echo -e "failed on: $*"
+ error_sound
exit 1
fi
}
sed -i -e "s%$pattern%$replacement%g" "$file"
}
+ ##############
+
function function_sentinel() { return 0; }
if [ ! -z "$SHELL_DEBUG" ]; then echo function definitions end....; fi