]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/release/makewinrel
Final po changes for Release-5.0.3
[bacula/bacula] / bacula / release / makewinrel
index ef1f1a63a646fe604d3760f10c81e5f0df7343e6..b3278080ced3945aa6753a82b88165040474b7e8 100755 (executable)
@@ -9,6 +9,8 @@
 #
 # Commit all changes, export the release, make a release tar.
 #
+. ./functions
+
 cwd=`pwd`
 reltype=release
 tagbase=Release-
@@ -22,27 +24,19 @@ if [ $# != 4 ] ; then
   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}
 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