-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathlompsa.sh
38 lines (35 loc) · 1.03 KB
/
lompsa.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# ##############################################################################
#
# Builds lompsa TRADER demo web edition and publishes the result on lompsa.com
#
# ##############################################################################
echo "start building mofowallet"
VERSION=`cat VERSION`
MODE_JS_FILE='app/mode.js'
MODE_JS=$(cat <<'END_HEREDOC'
/* This file is autogenerated by the build system */
var VERSION='#VERSION#';
var ENABLE_DUAL_ENGINES=false;
var IS_TEST_NET=false;
var FORCE_LOCAL_HOST=false;
var TRADE_UI_ONLY=false;
var DEBUG=false;
var BUILD_TIMESTAMP=#TIMESTAMP#;
var WALLET_NAME='Lompsa.com';
END_HEREDOC
)
cat > $MODE_JS_FILE <<EOF
$MODE_JS
EOF
orig=#VERSION#
sed -i "s/${orig}/${VERSION}/g" $MODE_JS_FILE
orig=#TIMESTAMP#
timestamp=$(date +%s)
sed -i "s/${orig}/${timestamp}/g" $MODE_JS_FILE
grunt build
echo "successfully built mofowallet"
# copy over all code to lompsa server
#mv dist/index.html dist/index.htm
DATE=`date`
echo "<!--$DATE-->" >> dist/index.html
scp -r -P 33 dist/* [email protected]:/var/www/lompsa/docs