X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Ffunctions.sh;h=41d94b938e9144d29218e8fa31961b8a11f2a39f;hb=aab3d5746e13a49520cb5fb698e873f89d5666c2;hp=903a17d1d9cb4a384ab05be9f5b4acf23f6c7bc1;hpb=22415d0725fa56857f3e7744a0cd1c741e2e9191;p=feisty_meow.git diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 903a17d1..41d94b93 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -33,17 +33,32 @@ if [ -z "$skip_all" ]; then cd "$1" } + # displays the value of a variable in bash friendly format. + function var() { + while true; do + local varname="$1"; shift + if [ -z "$varname" ]; then + break + fi + if [ -z "${!varname}" ]; then + echo "$varname undefined" + else + echo "$varname=${!varname}" + fi + done + } + function success_sound() { if [ ! -z "$CLAM_FINISH_SOUND" ]; then - play "$CLAM_FINISH_SOUND" + bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh "$CLAM_FINISH_SOUND" fi } function error_sound() { if [ ! -z "$CLAM_ERROR_SOUND" ]; then - play "$CLAM_ERROR_SOUND" + bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh "$CLAM_ERROR_SOUND" fi } @@ -357,6 +372,8 @@ if [ -z "$skip_all" ]; then sed -i -e "s%$pattern%$replacement%g" "$file" } + ############## + function function_sentinel() { return 0; } if [ ! -z "$SHELL_DEBUG" ]; then echo function definitions end....; fi