merge latest updates

This commit is contained in:
Isaac Connor 2017-05-09 16:57:28 -04:00
parent b2fc959a50
commit 3215f2e702
1 changed files with 27 additions and 15 deletions

View File

@ -52,7 +52,9 @@ case $i in
shift # past argument with no value
;;
*)
# unknown option
# unknown option
read -p "Unknown option $i, continue? (Y|n)"
[[ $REPLY == [yY] ]] && { echo "continuing..."; } || exit 1;
;;
esac
done
@ -66,6 +68,8 @@ fi;
if [ "$DISTRO" == "" ]; then
DISTRO=`lsb_release -a 2>/dev/null | grep Codename | awk '{print $2}'`;
echo "Defaulting to $DISTRO for distribution";
else
echo "Building for $DISTRO";
fi;
# Release is a special mode... it uploads to the release ppa and cannot have a snapshot
@ -141,7 +145,7 @@ if [ "$SNAPSHOT" != "stable" ] && [ "$SNAPSHOT" != "" ]; then
VERSION="$VERSION~$SNAPSHOT";
fi;
DIRECTORY="zoneminder_$VERSION-$DISTRO${PACKAGE_VERSION}";
DIRECTORY="zoneminder_$VERSION";
echo "Doing $TYPE release $DIRECTORY";
mv "${GITHUB_FORK}_zoneminder_release" "$DIRECTORY.orig";
cd "$DIRECTORY.orig";
@ -149,12 +153,12 @@ cd "$DIRECTORY.orig";
git submodule init
git submodule update --init --recursive
if [ "$DISTRO" == "trusty" ] || [ "$DISTRO" == "precise" ]; then
ln -sf distros/ubuntu1204 debian
mv distros/ubuntu1204 debian
else
if [ "$DISTRO" == "wheezy" ]; then
ln -sf distros/debian debian
mv distros/debian debian
else
ln -sf distros/ubuntu1604 debian
mv distros/ubuntu1604 debian
fi;
fi;
@ -192,20 +196,24 @@ zoneminder ($VERSION-$DISTRO${PACKAGE_VERSION}) $DISTRO; urgency=$URGENCY
EOF
fi;
# Auto-install all ZoneMinder's depedencies using the Debian control file
sudo apt-get install devscripts equivs
sudo mk-build-deps -ir ./debian/control
echo "Status: $?"
rm -rf .git
rm .gitignore
cd ../
tar zcf $DIRECTORY.orig.tar.gz $DIRECTORY.orig
cd $DIRECTORY.orig
#rm -rf .git
#rm .gitignore
#cd ../
#tar zcf zoneminder_$VERSION-$DISTRO.orig.tar.gz zoneminder_$VERSION-$DISTRO-$SNAPSHOT.orig
#cd zoneminder_$VERSION-$DISTRO-$SNAPSHOT.orig
if [ $TYPE == "binary" ]; then
# Auto-install all ZoneMinder's depedencies using the Debian control file
sudo apt-get install devscripts equivs
sudo mk-build-deps -ir ./debian/control
echo "Status: $?"
DEBUILD=debuild
else
if [ $TYPE == "local" ]; then
# Auto-install all ZoneMinder's depedencies using the Debian control file
sudo apt-get install devscripts equivs
sudo mk-build-deps -ir ./debian/control
echo "Status: $?"
DEBUILD="debuild -i -us -uc -b"
else
DEBUILD="debuild -S -sa"
@ -215,7 +223,11 @@ if [ "$DEBSIGN_KEYID" != "" ]; then
DEBUILD="$DEBUILD -k$DEBSIGN_KEYID"
fi
$DEBUILD
echo "Status: $?"
if [ $? -ne 0 ]; then
echo "Error status code is: $?"
echo "Build failed.";
exit $?;
fi;
cd ../
if [ "$INTERACTIVE" != "no" ]; then