From 934ed7c0d97958118b79e6c3da35fd1fae6b8e17 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Wed, 5 Oct 2016 12:12:21 +0800 Subject: Copy config only when file not exist --- bin/setup | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3