X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Ffunctions.sh;h=a66d19398960a4e9d896081bb2910e6ac539ad55;hb=409e16d594529b70ac9090cefec0452074c9603f;hp=4991adf83bb1821f745782135c537b3c660e0f97;hpb=9756fee21152847f27a2514d2bac32cee03db9ac;p=feisty_meow.git diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 4991adf8..a66d1939 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -791,6 +791,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.