forked from galaxyproteomics/mvpapplication-git
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_dev.sh
27 lines (21 loc) · 841 Bytes
/
build_dev.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
#!/bin/bash
PACKAGE_NAME='mvpapp'
SOURCE_LOCATION='./src'
TEMPLATE='./mvpapp.mako'
CONFIG='./mvpapp.xml'
if [ -d ./$PACKAGE_NAME ]; then
rm -rf ./$PACKAGE_NAME;
fi;
if [ ! -d ./$PACKAGE_NAME ]; then
mkdir -p ./$PACKAGE_NAME/config;
mkdir -p ./$PACKAGE_NAME/static/css;
mkdir -p ./$PACKAGE_NAME/static/js/lib;
mkdir -p ./$PACKAGE_NAME/templates;
fi;
cp -a $SOURCE_LOCATION/js/lib/. ./$PACKAGE_NAME/static/js/lib
cp -a $SOURCE_LOCATION/css/. ./$PACKAGE_NAME/static/css/
cp $TEMPLATE ./$PACKAGE_NAME/templates
cp $CONFIG ./$PACKAGE_NAME/config
cat $SOURCE_LOCATION/js/modules/*js > $SOURCE_LOCATION/application_full.js && cat $SOURCE_LOCATION/app.js >> $SOURCE_LOCATION/application_full.js
mv $SOURCE_LOCATION/application_full.js ./$PACKAGE_NAME/static/js/application.js
tar -czf ./$PACKAGE_NAME.tar.gz ./$PACKAGE_NAME