Revision: 70232 http://trac.macports.org/changeset/70232 Author: and.damore@macports.org Date: 2010-08-02 16:16:41 -0700 (Mon, 02 Aug 2010) Log Message: ----------- updated tools Modified Paths: -------------- branches/gsoc10-configfiles/tools/gsocdummyupdate.sh branches/gsoc10-configfiles/tools/gsocswitchversion Added Paths: ----------- branches/gsoc10-configfiles/tools/gsocdummy/ Removed Paths: ------------- branches/gsoc10-configfiles/tools/gsoc-dummy/ Property Changed: ---------------- branches/gsoc10-configfiles/tools/ Property changes on: branches/gsoc10-configfiles/tools ___________________________________________________________________ Added: svn:ignore + gsocdummy.tar.gz Modified: branches/gsoc10-configfiles/tools/gsocdummyupdate.sh =================================================================== --- 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 =================================================================== --- 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
participants (1)
-
and.damore@macports.org