forked from Ericsson/exchangecalendar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·28 lines (23 loc) · 701 Bytes
/
build.sh
File metadata and controls
executable file
·28 lines (23 loc) · 701 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
#!/bin/sh
usage() { echo "Usage: $0 [-u | -d ]" 1>&2;echo "-u:enable update";echo "-d:disable update"; exit 1; }
if [ $# = 0 ];then
usage
fi
version=`sed -n -e "s/.*<em:version>\(.*\)<\/em:version>/\1/p" install.rdf`
while getopts ":ud" OPTION
do
case ${OPTION} in
u) echo "update"
cat defaults/preferences/update_enable.txt > defaults/preferences/update.js
zip -r exchangecalendar-$version.xpi * -x \*.git \*.xpi \*.sh update\*.txt
exit
;;
d) echo "no update"
cat defaults/preferences/update_disable.txt > defaults/preferences/update.js
zip -r exchangecalendar-$version.xpi * -x \*.git \*.xpi \*.sh update\*.txt
exit
;;
*) usage ;;
esac
done
usage