]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/release/makewinrel
Final po changes for Release-5.0.3
[bacula/bacula] / bacula / release / makewinrel
index 814183afbad3c2ee708b40ce2d2cc206915a657b..b3278080ced3945aa6753a82b88165040474b7e8 100755 (executable)
@@ -9,40 +9,34 @@
 #
 # Commit all changes, export the release, make a release tar.
 #
+. ./functions
+
 cwd=`pwd`
 reltype=release
 tagbase=Release-
 base_pkg=bacula
 remote=$2
 branch=$3
+ver=$4
 
-if [ $# != 3 ] ; then
-  echo "Need $0 <bacula-source-directory> <remote-name> <branch>"
-  echo "e.g. $0 rescue-source bee Branch-4.0"
+if [ $# != 4 ] ; then
+  echo "Need $0 <bacula-source-directory> <remote-name> <branch> <version>"
+  echo "e.g. $0 rescue-source bee Branch-4.0 4.0.1"
   exit 1
 fi
-cd $1
-if [ $? -ne 0 ]; then
-   echo "Directory: $1 does not exist"
-   exit 1
-fi
-cd bacula
-if [ $?  -ne 0 ]; then
-   echo "Directory: $1 does not exist"
-   exit 1
-fi
+cd $1/bacula
+check_return_code "$0: Directory $1/bacula does not exist"
+src=$1/bacula
+
 current=`git branch | awk '/*/ { print $2 }'`
 src=`pwd` 
 git checkout ${branch}
-if [ $? -ne 0 ]; then
-   echo "Checkout of branch ${branch} in ${src} failed."
-   exit 1
-fi
+check_return_code "$0: Checkout of branch ${branch} in ${src} failed."
+
 git pull ${remote} ${branch}
-ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' src/version.h`
 fulltag=$tagbase$ver
 echo " "
-echo "Making $reltype for Windows $base_pkg-$ver ..."
+echo "$0: Making $reltype for Windows $base_pkg-$ver ..."
 echo " "
 echo "OK?  ctl-c to stop"
 read a
@@ -66,3 +60,4 @@ ls -l ${base_pkg}-win*.exe*
 cd ${src}
 # get back to original branch
 git checkout ${current}
+exit 0