rm -rf .git
}
-if [ ! -d .git ]; then
- echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
- exit 1;
-fi
+check_pwd () {
+ if [ ! -d .git ]; then
+ echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
+ exit 1;
+ fi
+}
-if [ -z "$1" ]; then
- echo "usage: $0 <version> <build-number>" 1>&2
- exit 1;
-fi
+check_input_ver_build () {
+ if [ -z "$1" ]; then
+ echo "usage: $0 <version> <build-number>" 1>&2
+ exit 1;
+ fi
+}
[ -n "${0%/*}" ] && sdir="${0%/*}"
. $sdir/common.sh
+check_pwd
+check_input_ver_build
eval $(parse_version "$1")
datestamp="$(date +%Y%m%dT%H%M%SZ)"
nightly="n${datestamp}"
[ -n "${0%/*}" ] && sdir="${0%/*}"
. $sdir/common.sh
+check_pwd
+check_input_ver_build
eval $(parse_version "$1")
build="$2"
[ -n "${0%/*}" ] && sdir="${0%/*}"
. $sdir/common.sh
+check_pwd
+check_input_ver_build
eval $(parse_version "$1")
build="$2"
[ -n "${0%/*}" ] && sdir="${0%/*}"
. $sdir/common.sh
+check_pwd
+check_input_ver_build
eval $(parse_version "$1")
dst_name="freeswitch-$cmajor.$cminor.$cmicro"