summaryrefslogtreecommitdiff
path: root/source3/script/installdirs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source3/script/installdirs.sh')
-rwxr-xr-xsource3/script/installdirs.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/script/installdirs.sh b/source3/script/installdirs.sh
new file mode 100755
index 0000000000..dd8f7cd19c
--- /dev/null
+++ b/source3/script/installdirs.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+BASEDIR=$1
+SBINDIR=$2
+BINDIR=$3
+LIBDIR=$4
+VARDIR=$5
+PRIVATEDIR=$6
+
+for d in $BASEDIR $SBINDIR $BINDIR $LIBDIR $VARDIR $PRIVATEDIR; do
+if [ ! -d $d ]; then
+mkdir $d
+if [ ! -d $d ]; then
+ echo Failed to make directory $d
+ exit 1
+fi
+fi
+done
+
+