--- /dev/null
+#!/bin/bash
+##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
+
+src_repo="$(pwd)"
+tmp_dir=${TMP_DIR:="/tmp"}
+
+parse_version () {
+ local ver="$1"
+ local major=$(echo "$ver" | cut -d. -f1)
+ local minor=$(echo "$ver" | cut -d. -f2)
+ local micro=$(echo "$ver" | cut -d. -f3)
+ local rev=$(echo "$ver" | cut -d. -f4)
+ echo "ver='$ver'"
+ echo "major='$major'"
+ echo "minor='$minor'"
+ echo "micro='$micro'"
+ echo "rev='$rev'"
+}
+
+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 MAJOR.MINOR.MICRO[.REVISION] BUILD_NUMBER" 1>&2
+ exit 1;
+fi
+
#!/bin/bash
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
-src_repo="$(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: ./scripts/ci/debbuilder.sh MAJOR.MINOR.MICRO[.REVISION] BUILD_NUMBER" 1>&2
- exit 1;
-fi
-
-ver="$1"
-major=$(echo "$ver" | cut -d. -f1)
-minor=$(echo "$ver" | cut -d. -f2)
-micro=$(echo "$ver" | cut -d. -f3)
-rev=$(echo "$ver" | cut -d. -f4)
+sdir="."
+[ -n "${0%/*}" ] && sdir="${0%/*}"
+. $sdir/common.sh
+eval $(parse_version "$1")
datestamp="$(date +%Y%m%dT%H%M%SZ)"
nightly="n${datestamp}"
build="b$2"
#!/bin/bash
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
-src_repo="$(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: ./scripts/ci/rpmbuilder.sh MAJOR.MINOR.MICRO[.REVISION] BUILD_NUMBER" 1>&2
- exit 1;
-fi
-
-ver="$1"
-major=$(echo "$ver" | cut -d. -f1)
-minor=$(echo "$ver" | cut -d. -f2)
-micro=$(echo "$ver" | cut -d. -f3)
-rev=$(echo "$ver" | cut -d. -f4)
+sdir="."
+[ -n "${0%/*}" ] && sdir="${0%/*}"
+. $sdir/common.sh
+eval $(parse_version "$1")
build="$2"
dst_name="freeswitch-$major.$minor.$micro"
#!/bin/bash
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
-src_repo="$(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: ./scripts/ci/rpmbuilder.sh MAJOR.MINOR.MICRO[.REVISION] BUILD_NUMBER" 1>&2
- exit 1;
-fi
-
-ver="$1"
-major=$(echo "$ver" | cut -d. -f1)
-minor=$(echo "$ver" | cut -d. -f2)
-micro=$(echo "$ver" | cut -d. -f3)
+sdir="."
+[ -n "${0%/*}" ] && sdir="${0%/*}"
+. $sdir/common.sh
+eval $(parse_version "$1")
build="$2"
cd rpmbuild/SOURCES
#!/bin/bash
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
-src_repo="$(pwd)"
+sdir="."
+[ -n "${0%/*}" ] && sdir="${0%/*}"
+. $sdir/common.sh
-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: ./scripts/dailys.sh MAJOR.MINOR.MICRO[.REVISION] BUILD_NUMBER" 1>&2
- exit 1;
-fi
-
-ver="$1"
-major=$(echo "$ver" | cut -d. -f1)
-minor=$(echo "$ver" | cut -d. -f2)
-micro=$(echo "$ver" | cut -d. -f3)
-rev=$(echo "$ver" | cut -d. -f4)
-
-tmp_dir=${TMP_DIR:="/tmp"}
+eval $(parse_version "$1")
dst_name="freeswitch-$major.$minor.$micro"
dst_parent="${tmp_dir}/jenkis.$$/"