2013-08-09 16:31:05 -04:00
|
|
|
#!/bin/bash
|
2013-09-02 13:20:30 -04:00
|
|
|
set -x
|
2013-08-09 16:31:05 -04:00
|
|
|
|
|
|
|
V=$1
|
|
|
|
M=$2
|
|
|
|
|
2013-09-05 15:36:14 -04:00
|
|
|
APP_TITLE=`cat ../config/title`
|
2013-08-20 23:31:51 -04:00
|
|
|
|
2013-09-02 13:20:56 -04:00
|
|
|
dst=www
|
2013-08-09 16:31:05 -04:00
|
|
|
cmn_src=../web/common
|
|
|
|
client_src=../web/client
|
|
|
|
signup_src=../web/signup
|
|
|
|
refill_src=../web/refill
|
|
|
|
delete_src=../web/delete
|
|
|
|
mobile_large=../web/mobile_large
|
|
|
|
mobile_small=../web/mobile_small
|
|
|
|
learnmore=../web/learnmore
|
|
|
|
|
|
|
|
function replaceStrings() {
|
|
|
|
echo $1 $M
|
|
|
|
sed -i '' -f replace_html.sed $1
|
|
|
|
sed -i '' -f replace_html_$M.sed $1
|
|
|
|
sed -i '' -e s/__VERSION__/$V/g $1
|
|
|
|
sed -i '' -e s/__THIS_YEAR__/2013/g $1
|
2013-08-20 23:31:51 -04:00
|
|
|
|
|
|
|
sed -i '' -e s/{##TITLE##}/$APP_TITLE/g $1
|
2013-08-09 16:31:05 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
echo Compiling CSS/JS
|
|
|
|
rm -rf $dst/rev
|
|
|
|
mkdir -p $dst/rev/$V
|
|
|
|
|
|
|
|
cat $cmn_src/*.css $client_src/*.css > $dst/rev/$V/client.css
|
|
|
|
cat $cmn_src/*.js $client_src/*.js > $dst/rev/$V/client.js
|
|
|
|
|
|
|
|
cat $cmn_src/*.css $signup_src/*.css > $dst/rev/$V/signup.css
|
|
|
|
cat $cmn_src/*.js $signup_src/*.js > $dst/rev/$V/signup.js
|
|
|
|
|
|
|
|
cat $cmn_src/*.css $refill_src/*.css > $dst/rev/$V/refill.css
|
|
|
|
cat $cmn_src/*.js $refill_src/*.js > $dst/rev/$V/refill.js
|
|
|
|
|
|
|
|
cat $cmn_src/*.css $delete_src/*.css > $dst/rev/$V/delete.css
|
|
|
|
cat $cmn_src/*.js $delete_src/*.js > $dst/rev/$V/delete.js
|
|
|
|
|
|
|
|
cat $cmn_src/*.js $client_src/*.js $mobile_large/*.js > $dst/rev/$V/mobile_large.js
|
|
|
|
cat $cmn_src/*.css $client_src/*.css $mobile_large/*.css > $dst/rev/$V/mobile_large.css
|
|
|
|
|
|
|
|
cat $cmn_src/*.js $client_src/*.js $mobile_small/*.js > $dst/rev/$V/mobile_small.js
|
|
|
|
cat $cmn_src/*.css $client_src/*.css $mobile_small/*.css > $dst/rev/$V/mobile_small.css
|
|
|
|
|
|
|
|
cat $cmn_src/*.css $learnmore/*.css > $dst/rev/$V/learnmore.css
|
|
|
|
|
|
|
|
echo Copying
|
|
|
|
cp $client_src/index.html $dst/index.html
|
|
|
|
cp $signup_src/signup.html $dst/signup.html
|
|
|
|
cp $refill_src/refill.html $dst/refill.html
|
|
|
|
cp $delete_src/delete.html $dst/delete.html
|
|
|
|
cp $mobile_large/mobile_large.html $dst/mobile_large.html
|
|
|
|
cp $mobile_small/mobile_small.html $dst/mobile_small.html
|
|
|
|
cp $learnmore/learnmore.html $dst/learnmore.html
|
|
|
|
cp $learnmore/technical.html $dst/technical.html
|
|
|
|
cp $signup_src/DropboxAuthorized.html $dst/DropboxAuthorized.html
|
|
|
|
|
|
|
|
echo Replacing Strings
|
|
|
|
replaceStrings $dst/index.html
|
|
|
|
replaceStrings $dst/signup.html
|
|
|
|
replaceStrings $dst/refill.html
|
|
|
|
replaceStrings $dst/delete.html
|
|
|
|
replaceStrings $dst/mobile_large.html
|
|
|
|
replaceStrings $dst/mobile_small.html
|
|
|
|
replaceStrings $dst/learnmore.html
|
|
|
|
replaceStrings $dst/technical.html
|
|
|
|
replaceStrings $dst/DropboxAuthorized.html
|