From 01e9a34952bd6ddd383680b0ca2312e476ad07a6 Mon Sep 17 00:00:00 2001 From: horus_arch Date: Sun, 19 Apr 2015 22:09:52 +0200 Subject: Initial commit. --- setup.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 setup.sh (limited to 'setup.sh') 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 -- cgit v1.2.3