summaryrefslogtreecommitdiff
path: root/nfs/scripts/funcs.sh
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic.pouzenc@mines-albi.fr>2017-11-03 17:41:26 +0100
committerLudovic Pouzenc <ludovic.pouzenc@mines-albi.fr>2017-11-03 17:41:26 +0100
commit86863ee1f083dbdadcb896734b319aa59a2707c4 (patch)
tree94a5a47502621c0583ba79c2f0cc6a88c4ed806c /nfs/scripts/funcs.sh
parentfe5aa2731c35f3f73c968536ed43b0f390be36cf (diff)
downloadeficast-86863ee1f083dbdadcb896734b319aa59a2707c4.tar.gz
eficast-86863ee1f083dbdadcb896734b319aa59a2707c4.tar.bz2
eficast-86863ee1f083dbdadcb896734b319aa59a2707c4.zip
Some more deploy scripting and hard-coded tests
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
+}
+