r573 - /scripts/export-boinc

fst-guest at users.alioth.debian.org fst-guest at users.alioth.debian.org
Sat Feb 10 09:08:43 CET 2007


Author: fst-guest
Date: Sat Feb 10 09:08:43 2007
New Revision: 573

URL: http://svn.debian.org/wsvn/pkg-boinc/?sc=1&rev=573
Log:
If $VERSION = "HEAD", replace it with the version number from AC_INIT in
configure.ac. I think that is better/nicer than having boinc_HEAD.orig.tar.gz
tarballs.

Modified:
    scripts/export-boinc

Modified: scripts/export-boinc
URL: http://svn.debian.org/wsvn/pkg-boinc/scripts/export-boinc?rev=573&op=diff
==============================================================================
--- scripts/export-boinc (original)
+++ scripts/export-boinc Sat Feb 10 09:08:43 2007
@@ -5,6 +5,7 @@
 #     or export-boinc -r 4.72 -d 20050724
 #     or export-boinc -r 4.72 -d 20050724 -c
 #     or export-boinc -r 4.72 -c
+#     or export-boinc
 
 set -e
 
@@ -41,10 +42,10 @@
 if [ -z "$DATE" -a "$CVS" -eq 0 ]; then
     DEBIAN_VERSION="$VERSION"
     ORIG_DIR="boinc-$DEBIAN_VERSION.orig"
-    if [ "HEAD" = "$VERSION" ]; then
+    if [ "$VERSION" = "HEAD" ]; then
 	    CVS_TAG=$VERSION
     else
-	    CVS_VERSION=`echo $VERSION | sed 's/\./_/g'`
+	    CVS_VERSION=$(echo $VERSION | sed 's/\./_/g')
 	    CVS_TAG="boinc_core_release_$CVS_VERSION"
     fi
     CVS_COMMAND="cvs -d $CVS_ROOT export -r $CVS_TAG -d $ORIG_DIR $CVS_MODULE"
@@ -60,7 +61,7 @@
     CVS_COMMAND="cvs -d $CVS_ROOT export -D $DATE -d $ORIG_DIR $CVS_MODULE"
 
 elif [ -z "$DATE" -a "$CVS" -eq 1 ]; then
-    DATE=`date +%Y%m%d`
+    DATE=$(date +%Y%m%d)
     DEBIAN_VERSION="$VERSION+cvs$DATE"
     ORIG_DIR="boinc-$DEBIAN_VERSION.orig"
     CVS_COMMAND="cvs -d $CVS_ROOT export -D now -d $ORIG_DIR $CVS_MODULE"
@@ -102,6 +103,23 @@
 rm -f "$ORIG_DIR/.vimrc"
 find $ORIG_DIR -name .cvsignore -exec rm '{}' \;
 
+###
+### preparations of the tarball
+###
+
+# replace HEAD with the actual version number
+if [ $VERSION = "HEAD" ]; then
+    CFG_AC="$ORIG_DIR/configure.ac"
+    VERSION="$(grep AC_INIT $CFG_AC | cut -d ',' -f 2 | sed 's/\s*)*//g')"
+
+    OLD_ORIG_DIR="$ORIG_DIR"
+    ORIG_DIR="$(echo $ORIG_DIR | sed s/HEAD/$VERSION/)"
+    ORIG_ARCHIVE="$(echo $ORIG_ARCHIVE | sed s/HEAD/$VERSION/)"
+
+    echo "mv $OLD_ORIG_DIR $ORIG_DIR"
+    mv $OLD_ORIG_DIR $ORIG_DIR
+fi
+
 # look for directories where we can place the orig tarball
 DEST_DIR=""
 set_destdir "tarfiles"
@@ -109,7 +127,7 @@
 set_destdir "tarballs"
 set_destdir "tarballs/boinc"
 
-echo "Preparing source tarball as '$DEST_DIR$ORIG_ARCHIVE'"
+echo "Preparing source tarball as '$DEST_DIR$ORIG_ARCHIVE'."
 tar czf $DEST_DIR$ORIG_ARCHIVE $ORIG_DIR
 rm -rf $ORIG_DIR
 




More information about the pkg-boinc-commits mailing list