This commit is contained in:
life
2015-04-20 20:51:03 +08:00
parent fa08b3393a
commit f3a0a786c5
3 changed files with 11 additions and 1 deletions

View File

@ -75,6 +75,10 @@ cp -r ./app/views $tmp/leanote/app
# conf
cp ./conf/app.conf $tmp/leanote/conf/app.conf
cp ./conf/routes $tmp/leanote/conf/routes
# 处理app.conf, 还原配置
cat $tmp/leanote/conf/app.conf | sed 's/db.dbname=leanote.*#/db.dbname=leanote #/' > $tmp/leanote/conf/app.conf2 # 不能直接覆盖
rm $tmp/leanote/conf/app.conf
mv $tmp/leanote/conf/app.conf2 $tmp/leanote/conf/app.conf
# others
cp -r ./messages ./public ./mongodb_backup $tmp/leanote/

View File

@ -17,6 +17,13 @@ export GOPATH=$GOPATH:$SCRIPTPATH
osName=`uname` # Darwin or Linux
osName=`tr '[A-Z]' '[a-z]' <<<"$osName"` # toLowerCase
bit=`getconf LONG_BIT` # 32, 64
if [ $bit = "64" ]
then
bit="amd64"
else
bit="386"
fi
script="$SCRIPTPATH/leanote-$osName-$bit"
chmod 777 $script
$script -importPath github.com/leanote/leanote