r646 - /branches/experimental/README.txt /branches/experimental/tarfiles/ /scripts/export-boinc

smoe-guest at users.alioth.debian.org smoe-guest at users.alioth.debian.org
Wed May 9 21:10:19 UTC 2007


Author: smoe-guest
Date: Wed May  9 21:10:12 2007
New Revision: 646

URL: http://svn.debian.org/wsvn/pkg-boinc/?sc=1&rev=646
Log:
branches/experimental/tarfiles
 * empty directory added to help newbies to decide on 
   where to execute the export-boinc script.
   This may be nonsense, Frank, please consider to just
   remove it again, but the export-boinc script
   should then check for [ -d boinc ] from the current
   directory and `mkdir tarfiles` if it is not existing
   as the default destination.

branches/experimental/README.txt
 * pointer to our BOINC/Development wiki page

scripts/export-boinc
 * the only serious work of this evening - added
   a -h flag, a -v for verbosity setting, a -t
   to set the tarfile directory (untested).
 * eliminated the set_destdir function
 * directories tested for existence are now
   in a variable rather than hard coded, go
   together with the -t flag (untested, though)

As usual: Many thanks to Frank.

Steffen


Added:
    branches/experimental/README.txt
    branches/experimental/tarfiles/
Modified:
    scripts/export-boinc

Added: branches/experimental/README.txt
URL: http://svn.debian.org/wsvn/pkg-boinc/branches/experimental/README.txt?rev=646&op=file
==============================================================================
--- branches/experimental/README.txt (added)
+++ branches/experimental/README.txt Wed May  9 21:10:12 2007
@@ -1,0 +1,9 @@
+A detailed description on how to self-compile the BOINC package 
+waits for you on the project's Wiki page at
+
+	http://wiki.debian.org/BOINC/Development
+
+It explains svn, our helping export-boinc script and svn-buildpackage.
+If you are inclined to work on a package for the unstable upstream
+distribution, then this directory is the place from where to execute
+the export-boinc scrip.

Modified: scripts/export-boinc
URL: http://svn.debian.org/wsvn/pkg-boinc/scripts/export-boinc?rev=646&op=diff
==============================================================================
--- scripts/export-boinc (original)
+++ scripts/export-boinc Wed May  9 21:10:12 2007
@@ -9,31 +9,70 @@
 
 set -e
 
-set_destdir()
-{
-    if [ -d "$1" -a -w "$1" ]; then
-        DEST_DIR="$1"
-    fi
-}
+DIRS="tarfiles tarfiles/boinc tarballs tarballs/boinc"
 
 SVN_ROOT="http://boinc.berkeley.edu/svn"
 
 # get options
 SNAPSHOT=0
-while getopts "r:d:s" FLAG
+VERBOSE=0
+while getopts "r:d:s:v:t:h" FLAG
 do
     if test "$FLAG" = "r"; then
         VERSION=$OPTARG
     elif test "$FLAG" = "d"; then
         DATE=$OPTARG
+    elif test "$FLAG" = "t"; then
+        DIRS=$OPTARG
     elif test "$FLAG" = "s"; then
         SNAPSHOT=1
+    elif test "$FLAG" = "v"; then
+        VERBOSE=1
+    elif test "$FLAG" = "h"; then
+        cat <<EOHELP
+
+Usage: export-boinc <options>
+
+       -d YYYYMMDD retrieve version of particular day
+       -r X.Y	   retrieve particular release
+       -s          retrieve snapshot        
+       -h          this usage description
+       -t path     specify directory at which to store tarfile
+       -v          verbose output and debug messages
+
+       These flags can be combined. The retrieval of the 
+       very latest version (HEAD) is the default.
+       This script can be executed from any directory. It is
+       however suggested to chose one at CWD that has any
+       of the following as a subdirectory for compatibility
+       with the tool svn-buildpackage:
+EOHELP
+	for dd in $DIRS
+	do
+	    echo "          $dd"
+	done
+	exit -1
     fi
 done
 
+SVN=`which svn`
+if [ -z "$SVN" ]; then
+    cat <<EOSVNPROB
+Error: The subversion tool (svn) is not found.
+       Please modify the PATH environment variable
+       and crosscheck that the package subversion
+       is installed.
+EOSVNPROB
+    exit -1
+elif [ "$VERBOSE" -gt 0 ]; then
+    echo "Using subversion binary at '$SVN'"
+fi
+
 # validate options
 if [ -z "$VERSION" ]; then
-    echo "Warning: version number was not specified, assuming 'HEAD'"
+    if [ $VERBOSE -gt 0 ]; then
+        echo "Warning: version number was not specified, assuming 'HEAD'"
+    fi
     VERSION="HEAD"
     SVN_DIR="trunk/boinc"
 fi
@@ -123,11 +162,22 @@
 fi
 
 # look for directories where we can place the orig tarball
+
 DEST_DIR=""
-set_destdir "tarfiles"
-set_destdir "tarfiles/boinc"
-set_destdir "tarballs"
-set_destdir "tarballs/boinc"
+for dd in $DIRS
+do
+    if [ -z "$DEST_DIR" -a -d "$dd" -a -w "$dd" ]; then
+        DEST_DIR="$dd"
+    fi
+done
+
+if [ -z "$DEST_DIR" ]; then
+    cat <<EODESTDIRPROB
+Could not assign destination directory after inspecting
+all directories at '$DIRS'.
+EODESTDIRPROB
+    exit -1
+fi
 
 echo "Preparing source tarball as '$DEST_DIR/$ORIG_ARCHIVE'."
 tar cf - $ORIG_DIR | gzip -c9 > "$DEST_DIR/$ORIG_ARCHIVE"




More information about the pkg-boinc-commits mailing list