fixup zmrepo options for releases and master

This commit is contained in:
Isaac Connor 2017-05-04 16:14:43 -04:00
parent ad166ab49a
commit 7b5e9968ad
1 changed files with 20 additions and 10 deletions

View File

@ -127,11 +127,7 @@ else
fi;
cd "${GITHUB_FORK}_zoneminder_release"
if [ $RELEASE ]; then
git checkout $RELEASE
else
git checkout $BRANCH
fi;
cd ../
VERSION=`cat ${GITHUB_FORK}_zoneminder_release/version`
@ -146,6 +142,11 @@ fi;
DIRECTORY="zoneminder_$VERSION";
echo "Doing $TYPE release $DIRECTORY";
mv "${GITHUB_FORK}_zoneminder_release" "$DIRECTORY.orig";
if [ $? -ne 0 ]; then
echo "Error status code is: $?"
echo "Setting up build dir failed.";
exit $?;
fi;
cd "$DIRECTORY.orig";
git submodule init
@ -214,6 +215,7 @@ else
echo "Status: $?"
DEBUILD="debuild -i -us -uc -b"
else
# Source build, don't need build depends.
DEBUILD="debuild -S -sa"
fi;
fi;
@ -230,10 +232,10 @@ fi;
cd ../
if [ "$INTERACTIVE" != "no" ]; then
read -p "Do you want to keep the checked out version of Zoneminder (incase you want to modify it later) [y/N]"
[[ $REPLY == [yY] ]] && { mv $DIRECTORY zoneminder_release; echo "The checked out copy is preserved in zoneminder_release"; } || { rm -fr $DIRECTORY; echo "The checked out copy has been deleted"; }
[[ $REPLY == [yY] ]] && { mv "$DIRECTORY.orig" zoneminder_release; echo "The checked out copy is preserved in zoneminder_release"; } || { rm -fr "$DIRECTORY.orig"; echo "The checked out copy has been deleted"; }
echo "Done!"
else
rm -fr $DIRECTORY; echo "The checked out copy has been deleted";
rm -fr "$DIRECTORY.orig"; echo "The checked out copy has been deleted";
fi
if [ $TYPE == "binary" ]; then
@ -247,7 +249,15 @@ if [ $TYPE == "binary" ]; then
echo "Do you want to upload this binary to zmrepo? (y/N)"
read install
if [ "$install" == "Y" ]; then
scp "zoneminder_*-${VERSION}-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/${BRANCH}/mini-dinstall/incoming/"
if [ "$RELEASE" != "" ]; then
scp "zoneminder_${VERSION}-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/stable/mini-dinstall/incoming/"
else
if [ "$BRANCH" == "" ]; then
scp "zoneminder_${VERSION}-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/master/mini-dinstall/incoming/"
else
scp "zoneminder_${VERSION}-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/${BRANCH}/mini-dinstall/incoming/"
fi;
fi;
fi;
fi;
fi;