This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
forked from Ericsson/exchangecalendar
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from logological/fixshell
Delint build script. ExchangeCalendar/exchangecalendar/#38
- Loading branch information
Showing
1 changed file
with
19 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
#!/bin/sh | ||
|
||
usage() { echo "Usage: $0 [-u | -d ]" 1>&2;echo "-u:enable update";echo "-d:disable update"; exit 1; } | ||
usage() { | ||
printf "Usage: %s [ -u | -d ]\n" "$0" 1>&2 | ||
printf " -u enable update\n" 1>&2 | ||
printf " -d disable update\n" 1>&2 | ||
exit 1 | ||
} | ||
|
||
if [ $# = 0 ];then | ||
usage | ||
if [ $# = 0 ];then | ||
usage | ||
fi | ||
|
||
version=`sed -n -e "s/.*<em:version>\(.*\)<\/em:version>/\1/p" install.rdf` | ||
while getopts ":ud" OPTION | ||
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-v$version.xpi * -x \*.git \*.xpi \*.sh update\*.txt | ||
exit | ||
;; | ||
cat defaults/preferences/update_enable.txt > defaults/preferences/update.js | ||
zip -r exchangecalendar-v"$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-v$version.xpi * -x \*.git \*.xpi \*.sh update\*.txt | ||
exit | ||
;; | ||
cat defaults/preferences/update_disable.txt > defaults/preferences/update.js | ||
zip -r exchangecalendar-v"$version".xpi ./* -x \*.git \*.xpi \*.sh update\*.txt | ||
exit | ||
;; | ||
*) usage ;; | ||
esac | ||
done | ||
|
||
usage | ||
|
||
usage |