summaryrefslogtreecommitdiff
path: root/bin/setup
diff options
context:
space:
mode:
authorYukai Huang2016-10-05 12:12:21 +0800
committerYukai Huang2016-10-05 12:12:21 +0800
commit934ed7c0d97958118b79e6c3da35fd1fae6b8e17 (patch)
tree2ef9036b46c5baacf410ce71117defc409e8c5d5 /bin/setup
parent5dfa83d350d38991ebaf12f0890bd91f726c670d (diff)
Copy config only when file not exist
Diffstat (limited to 'bin/setup')
-rwxr-xr-xbin/setup14
1 files changed, 11 insertions, 3 deletions
diff --git a/bin/setup b/bin/setup
index c29117af..f0d860dc 100755
--- a/bin/setup
+++ b/bin/setup
@@ -18,9 +18,17 @@ then
fi
echo "copy config files"
-cp config.json.example config.json
-cp public/js/common.js.example public/js/common.js
-cp .sequelizerc.example .sequelizerc
+if [ ! -f config.json ]; then
+ cp config.json.example config.json
+fi
+
+if [ ! -f publis/js/common.js ]; then
+ cp public/js/common.js.example public/js/common.js
+fi
+
+if [ ! -f .sequelizerc ]; then
+ cp .sequelizerc.example .sequelizerc
+fi
echo "install npm and bower packages"
npm install && bower install