2016-08-28 07:58:27 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
2016-09-19 03:34:27 +00:00
|
|
|
#version check
|
|
|
|
if grep centos /etc/*-release; then
|
|
|
|
echo "os : centos, use yum"
|
|
|
|
elif grep ubuntu /etc/*-release; then
|
|
|
|
echo "os : ubuntu, use apt-get install"
|
|
|
|
fi
|
|
|
|
|
2016-08-28 07:58:27 +00:00
|
|
|
# setup
|
2016-09-11 06:10:38 +00:00
|
|
|
sudo npm install -g bower
|
|
|
|
sudo --askpass bower install --allow-root
|
2016-09-11 06:12:38 +00:00
|
|
|
gem install bundler
|
2016-08-28 07:58:27 +00:00
|
|
|
bundle install
|
|
|
|
bin/rake db:migrate
|
|
|
|
|
|
|
|
# make configuration file
|
2016-09-08 08:51:24 +00:00
|
|
|
|
2016-08-28 07:58:27 +00:00
|
|
|
CONF_PATH=`pwd`/configure.conf
|
2016-09-08 08:51:24 +00:00
|
|
|
|
2016-09-11 06:10:38 +00:00
|
|
|
if ls `pwd` | grep configure.conf; then
|
2016-09-08 08:51:24 +00:00
|
|
|
echo "configure.conf exist"
|
|
|
|
else
|
2016-08-28 07:58:27 +00:00
|
|
|
touch $CONF_PATH
|
|
|
|
echo "project_path=`pwd`" >> $CONF_PATH
|
|
|
|
echo "server_name=gluster" >> $CONF_PATH
|
|
|
|
echo "host_ip=127.0.0.1" >> $CONF_PATH
|
2016-08-28 08:36:02 +00:00
|
|
|
echo "host_port=" >> $CONF_PATH
|
2016-08-28 07:58:27 +00:00
|
|
|
echo "host_user=root" >> $CONF_PATH
|
|
|
|
echo "host_password=secret" >> $CONF_PATH
|
2016-09-08 08:51:24 +00:00
|
|
|
fi
|