diff options
author | Mark Linimon <linimon@FreeBSD.org> | 2009-11-16 00:17:05 +0000 |
---|---|---|
committer | Mark Linimon <linimon@FreeBSD.org> | 2009-11-16 00:17:05 +0000 |
commit | 1263d0c3a0a59eb64cb5130654c10a750631e4af (patch) | |
tree | 2b98abe12323628269d2de478b71f36ffd40ca52 /Tools | |
parent | b5923ad84659688b2d26b29d6e481bce7eab3427 (diff) | |
download | ports-1263d0c3a0a59eb64cb5130654c10a750631e4af.tar.gz ports-1263d0c3a0a59eb64cb5130654c10a750631e4af.zip |
Refactor this to minimize hard-coding. When our support for branches
changes, now you only need to change 2 lines.
Notes
Notes:
svn path=/head/; revision=244309
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/updatesnap | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/Tools/portbuild/scripts/updatesnap b/Tools/portbuild/scripts/updatesnap index 9615eee24421..577ec3e7905c 100755 --- a/Tools/portbuild/scripts/updatesnap +++ b/Tools/portbuild/scripts/updatesnap @@ -3,6 +3,10 @@ # Update the master source trees that are used by package builds # and other consumers +# head is handled specially +HEAD_BRANCH="9" +NON_HEAD_BRANCHES="6 7 8" + base=/a/snap zbase=a/snap @@ -31,32 +35,20 @@ umask 002 #cvsup -g /root/cvs-supfile || finish 1 -cd $base/src-HEAD +cd $base/src-${HEAD_BRANCH} fulldate=$(date) cvs -Rq -d ${srepo} update -PdA -D "${fulldate}" echo ${fulldate} > cvsdone snapdate=$(stamp ${fulldate}) -zfs snapshot ${zbase}/src-HEAD@${snapdate} - -cd $base/src-6 -fulldate=$(date) -cvs -Rq -d ${srepo} update -PdA -D "${fulldate}" -r RELENG_6 -echo ${fulldate} > cvsdone -snapdate=$(stamp ${fulldate}) -zfs snapshot ${zbase}/src-6@${snapdate} - -cd $base/src-7 -fulldate=$(date) -cvs -Rq -d ${srepo} update -PdA -D "${fulldate}" -r RELENG_7 -echo ${fulldate} > cvsdone -snapdate=$(stamp ${fulldate}) -zfs snapshot ${zbase}/src-7@${snapdate} - -cd $base/src-8 -fulldate=$(date) -cvs -Rq -d ${srepo} update -PdA -D "${fulldate}" -r RELENG_8 -echo ${fulldate} > cvsdone -snapdate=$(stamp ${fulldate}) -zfs snapshot ${zbase}/src-8@${snapdate} +zfs snapshot ${zbase}/src-${HEAD_BRANCH}@${snapdate} + +for branch in $NON_HEAD_BRANCHES; do + cd $base/src-${branch} + fulldate=$(date) + cvs -Rq -d ${srepo} update -PdA -D "${fulldate}" -r RELENG_${branch} + echo ${fulldate} > cvsdone + snapdate=$(stamp ${fulldate}) + zfs snapshot ${zbase}/src-${branch}@${snapdate} +done finish 0 |