forked from xtech/self-o-mat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_app.sh
More file actions
48 lines (33 loc) · 721 Bytes
/
Copy pathdeploy_app.sh
File metadata and controls
48 lines (33 loc) · 721 Bytes
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
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
NAME=app
BINARY=self_o_mat
FILES="$BINARY settings/* i18n/* assets/* libs/* firmware.hex version app/*"
TAR=update.tar
BIN_DIR=$2
clean() {
echo "Cleaning in $BIN_DIR"
# to to build dir
cd $BIN_DIR
# clean libs
rm -rf ./libs
# clean settings and assets
rm -rf ./assets
rm -rf ./settings
rm -rf ./i18n
rm -rf ./firmware.hex
rm -rf ./version
rm -rf ./app
rm -rf $TAR
}
echo "Packing files in $1"
clean
cd $2
rm -f selfomat.update
# get the settings and assets from src dir into the build dir
cp -r $1/assets .
cp -r $1/settings .
cp -r $1/i18n .
cp $1/firmware.hex .
cp -r $1/web/www ./app
# write version info
echo -n "v_`date +'%s'`" > version