summaryrefslogtreecommitdiff
path: root/utils.sh
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-03-30 16:23:55 +0200
committerAndreas Maunz <andreas@maunz.de>2011-03-30 16:23:55 +0200
commita7449c8e38e29f390a75e6f3f39fe26096d508e3 (patch)
tree7aa5e1ceea83a2a6a935b38f8567735f5ec3a410 /utils.sh
parentf76f11eaf435397607f2aa5e70496c01005d5c6b (diff)
Added utils.sh
Diffstat (limited to 'utils.sh')
-rw-r--r--utils.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/utils.sh b/utils.sh
new file mode 100644
index 0000000..98893b4
--- /dev/null
+++ b/utils.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+function check_dest {
+ if ! [ -d $PREFIX ]; then
+ if ! mkdir -p $PREFIX;
+ echo "Could not create target directory '$PREFIX'! Aborting..."
+ exit 1
+ fi
+ fi
+}
+
+check_dest