diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index de7b31178..194499af2 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -62,21 +62,23 @@ if [ "$TYPE" == "" ]; then echo "Defaulting to source build" TYPE="source"; fi; -if [ "$GITHUB_FORK" == "" ]; then - echo "Defaulting to ZoneMinder upstream git" - GITHUB_FORK="ZoneMinder" -fi; # Release is a special mode... it uploads to the release ppa and cannot have a snapshot if [ "$RELEASE" != "" ]; then if [ "$SNAPSHOT" != "" ]; then echo "Releases cannot have a snapshot.... exiting." + exit 0; fi - if [ "$GITHUB_FORK" != "" ]; then - echo "Releases cannot have a fork.... exiting." + if [ "$GITHUB_FORK" != "" ] && [ "$GITHUB_FORK" != "ZoneMinder" ]; then + echo "Releases cannot have a fork ($GITHUB_FORK).... exiting." + exit 0; fi - BRANCH=$RELEASE + BRANCH="release-$RELEASE" else + if [ "$GITHUB_FORK" == "" ]; then + echo "Defaulting to ZoneMinder upstream git" + GITHUB_FORK="ZoneMinder" + fi; if [ "$SNAPSHOT" == "stable" ]; then if [ "$BRANCH" == "" ]; then BRANCH=$(git describe --tags $(git rev-list --tags --max-count=1)); @@ -99,6 +101,8 @@ if [ ! -d "${GITHUB_FORK}_zoneminder_release" ]; then if [ -d "${GITHUB_FORK}_ZoneMinder.git" ]; then echo "Using local clone ${GITHUB_FORK}_ZoneMinder.git to pull from." cd "${GITHUB_FORK}_ZoneMinder.git" + echo "git pull..." + git pull echo "git checkout $BRANCH" git checkout $BRANCH echo "git pull..." @@ -139,10 +143,10 @@ cd "$DIRECTORY.orig"; git submodule init git submodule update --init --recursive -if [ $DISTRO == "trusty" ] || [ $DISTRO == "precise" ]; then +if [ "$DISTRO" == "trusty" ] || [ "$DISTRO" == "precise" ]; then ln -sf distros/ubuntu1204 debian else - if [ $DISTRO == "wheezy" ]; then + if [ "$DISTRO" == "wheezy" ]; then ln -sf distros/debian debian else ln -sf distros/ubuntu1604 debian