base_pkg=bacula-rescue
base_dir=rescue
branch=$2
-ver=$2
+
if [ $# != 2 ] ; then
echo "Need $0 <rescue-source-directory> <branch>"
echo "e.g. $0 rescue-source master"
echo "Directory: $1 does not exist"
exit 1
fi
+
src=`pwd`
git checkout ${branch}
if [ $? -ne 0 ]; then
exit 1
fi
git pull origin ${branch}
+ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' version.h`
fulltag=$tagbase$ver
echo " "
echo "Making $reltype for $base_pkg-$ver ..."
./sign $base_pkg-$ver.tar.gz
ls -l $base_pkg-$ver.tar.*
-git push
-git push --tags
+if [ a$push != ano ]; then
+ cd ${src}
+ git push origin $branch
+ git push origin tag $fulltag
+fi