X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Ffunctions.sh;h=6797708525179750e9e84c5de98e4b211c44c2de;hb=b387a9ea45d480b8addb10258cf19aa671b3671d;hp=4991adf83bb1821f745782135c537b3c660e0f97;hpb=9756fee21152847f27a2514d2bac32cee03db9ac;p=feisty_meow.git diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 4991adf8..67977085 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -363,14 +363,15 @@ if [ -z "$skip_all" ]; then # sudo function wraps the normal sudo by ensuring we replace the terminal # label if they're doing an su with the sudo. function sudo() { -# local first_command="$1" save_terminal_title /usr/bin/sudo "$@" + retval=$? restore_terminal_title # if [ "$first_command" == "su" ]; then # # yep, they were doing an su, but they're back now. # label_terminal_with_info # fi + return $retval } # trashes the .#blah files that cvs and subversion leave behind when finding conflicts. @@ -388,6 +389,7 @@ if [ -z "$skip_all" ]; then echo "The nechung oracle program cannot be found. You may want to consider" echo "rebuilding the feisty meow applications with this command:" echo "bash $FEISTY_MEOW_SCRIPTS/generator/produce_feisty_meow.sh" + echo else $wheres_nechung fi @@ -791,6 +793,14 @@ return 0 echo "$this_host" } + # makes sure that the provided "folder" is a directory and is writable. + function test_writeable() + { + local folder="$1"; shift + if [ ! -d "$folder" -o ! -w "$folder" ]; then return 1; fi + return 0 + } + ############## # NOTE: no more function definitions are allowed after this point.