summaryrefslogtreecommitdiff
path: root/nfs/scripts/funcs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'nfs/scripts/funcs.sh')
-rw-r--r--nfs/scripts/funcs.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/nfs/scripts/funcs.sh b/nfs/scripts/funcs.sh
index a69fb75..a1757a1 100644
--- a/nfs/scripts/funcs.sh
+++ b/nfs/scripts/funcs.sh
@@ -60,3 +60,14 @@ scriptavailability_test() {
fi
}
+# $1 : scriptname, print colored message, returns 0 script is available, returns 1 if not
+diravailability_test() {
+ dir=$1
+ if [ -d $dir ]
+ then echo_color green black ">>> Image $dir is available"
+ return 0
+ else echo_color white blue ">>> Image $dir is missing or unreadable"
+ return 1
+ fi
+}
+