summaryrefslogtreecommitdiff
path: root/setup.sh
diff options
context:
space:
mode:
authorhorus_arch2015-04-19 22:09:52 +0200
committerhorus_arch2015-04-19 22:09:52 +0200
commit01e9a34952bd6ddd383680b0ca2312e476ad07a6 (patch)
tree00902575e5c271cc5d35ea65aa8795b8caeb97bc /setup.sh
downloadmandible-01e9a34952bd6ddd383680b0ca2312e476ad07a6.tar.gz
Initial commit.
Diffstat (limited to 'setup.sh')
-rwxr-xr-xsetup.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/setup.sh b/setup.sh
new file mode 100755
index 0000000..0ef2994
--- /dev/null
+++ b/setup.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -e
+if [ -z $UPLOAD_DIR ]; then
+# echo "Please provide env variable '\$UPLOAD_DIR'." 1>&2
+# exit 1
+ echo "Using $(pwd)/files as default for \$UPLOAD_DIR..."
+ export UPLOAD_DIR=$(pwd)/files
+fi
+
+mkdir -p $UPLOAD_DIR
+
+cd $UPLOAD_DIR && \
+ ln -s original i && \
+ cd ..
+
+if [ ! -f "config/conf.json" ]; then
+ cd config && \
+ cp default.conf.json conf.json && \
+ cd ..
+ sed -i "s|/Users/jarvis/imagestore|$UPLOAD_DIR|" config/conf.json
+fi