Revision
70232
Author
and.damore@macports.org
Date
2010-08-02 16:16:41 -0700 (Mon, 02 Aug 2010)

Log Message

updated tools

Modified Paths

Added Paths

Removed Paths

Property Changed

Diff

Property changes: branches/gsoc10-configfiles/tools


Added: svn:ignore

Modified: branches/gsoc10-configfiles/tools/gsocdummyupdate.sh (70231 => 70232)


--- branches/gsoc10-configfiles/tools/gsocdummyupdate.sh	2010-08-02 23:11:50 UTC (rev 70231)
+++ branches/gsoc10-configfiles/tools/gsocdummyupdate.sh	2010-08-02 23:16:41 UTC (rev 70232)
@@ -1,18 +1,18 @@
 #!/bin/bash
 
-TARFILE=gsoc-dummy.tar.gz 
-PORTFILE=$(port dir gsoc-dummy)/Portfile
+TARFILE=gsocdummy.tar.gz 
+PORTFILE=$(port dir gsocdummy)/Portfile
 read _ USER <<< $(id -p | grep login)
-#edit following line to point GSOCDUMMYDIR to the directory containing
-#"gsoc-dummy" tree
-GSOCDUMMYDIR=/Users/"$USER"/.macports/GSoC
+#make GSOCDUMMYDIR point to the directory containing "gsoc-dummy" tree
+#GSOCDUMMYDIR=/Users/"$USER"/.macports/GSoC
+GSOCDUMMYDIR=/opt/local/var/macports/sources/svn.macports.org/branches/gsoc10-configfiles/tools
 
 cd "$GSOCDUMMYDIR" && \
-tar zcf "$TARFILE" gsoc-dummy && \
+tar zcf "$TARFILE" --exclude '*.svn*' gsocdummy && \
 chown "$USER" "$TARFILE"
 
 TMPFILE=/tmp/TempPortfile$(date +"%Y%m%d%H%M")
-#just don't be nice, we need an empty file
+#let's just not be nice, we need an empty file
 if [ -f "$TMPFILE" ]; then rm "$TMPFILE"; fi;
 touch /tmp/tempPortfile
 

Modified: branches/gsoc10-configfiles/tools/gsocswitchversion (70231 => 70232)


--- branches/gsoc10-configfiles/tools/gsocswitchversion	2010-08-02 23:11:50 UTC (rev 70231)
+++ branches/gsoc10-configfiles/tools/gsocswitchversion	2010-08-02 23:16:41 UTC (rev 70232)
@@ -1,13 +1,16 @@
 #!/bin/bash
 
-PORTPATH=$(port dir gsoc-dummy)
+PORTPATH=$(port dir gsocdummy 2>/dev/null)
+if [[ ! $PORTPATH ]]; then echo "Error: can't find gsoc-dummy port directory"; exit 1; fi 
 read _ revision <<< $(cat "$PORTPATH"/Portfile | grep revision)
-echo -n "Switching gsoc-dummy from revision "
+echo -n "Switching gsocdummy from revision "
+cd "$PORTPATH"
 if [[ $revision = 0 ]]; then
     echo "0 to 1"
-    sed -e 's,\(revision[ ]*\)0,\11,' Portfile >"$PORTPATH"/NewPortfile
+    sed -e 's,\(revision[ ]*\)0,\11,' Portfile >NewPortfile
 else
     echo "1 to 0"
-    sed -e 's,\(revision[ ]*\)1,\10,' Portfile >"$PORTPATH"/NewPortfile
+    sed -e 's,\(revision[ ]*\)1,\10,' Portfile >NewPortfile
 fi
-mv "$PORTPATH"/NewPortfile "$PORTPATH"/Portfile
+cp Portfile Portfile.backup
+mv NewPortfile Portfile