diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2009-05-21 16:15:56 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2009-05-21 16:15:56 +0000 |
commit | 46e2ac6a6ff9bc4358abd6fb41d209224a61d990 (patch) | |
tree | 7f7763687e9fecacdbdb763cb311c42503e9a22e /Tools | |
parent | 2e9b06c517d68194b9adb11f2c97d3e3c3cfce2e (diff) | |
download | ports-46e2ac6a6ff9bc4358abd6fb41d209224a61d990.tar.gz ports-46e2ac6a6ff9bc4358abd6fb41d209224a61d990.zip |
Notes
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/updatesnap | 12 | ||||
-rwxr-xr-x | Tools/portbuild/scripts/updatesnap.ports | 50 |
2 files changed, 56 insertions, 6 deletions
diff --git a/Tools/portbuild/scripts/updatesnap b/Tools/portbuild/scripts/updatesnap index f968c4f2e626..98e385e0632d 100755 --- a/Tools/portbuild/scripts/updatesnap +++ b/Tools/portbuild/scripts/updatesnap @@ -32,12 +32,12 @@ umask 002 #cvsup -g /root/cvs-supfile || finish 1 -cd $base/ports -fulldate=$(date) -cvs -Rq -d ${prepo} update -PdA -D "${fulldate}" -echo ${fulldate} > cvsdone -snapdate=$(stamp ${fulldate}) -zfs snapshot ${zbase}/ports@${snapdate} +#cd $base/ports +#fulldate=$(date) +#cvs -Rq -d ${prepo} update -PdA -D "${fulldate}" +#echo ${fulldate} > cvsdone +#snapdate=$(stamp ${fulldate}) +#zfs snapshot ${zbase}/ports@${snapdate} cd $base/src-HEAD fulldate=$(date) diff --git a/Tools/portbuild/scripts/updatesnap.ports b/Tools/portbuild/scripts/updatesnap.ports new file mode 100755 index 000000000000..11558aa58665 --- /dev/null +++ b/Tools/portbuild/scripts/updatesnap.ports @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Update the master ports and source trees that are used by package builds +# and other consumers + +base=/a/snap +zbase=a/snap + +srepo=/r/ncvs +prepo=/r/pcvs + +supstamp() { + fulldate=$1 + date -j -f %+ "${fulldate}" +%Y.%m.%d.%H.%M.%S +} + +stamp() { + fulldate=$1 + date -j -f %+ "${fulldate}" +%Y%m%d%H%M%S +} + +finish() { + err=$1 + + end=$(date +%s) + echo "Finished at $(date)" + len=$((end-begin)) + echo "Duration = $(date -j -f %s +%H:%M:%S ${len})" + exit 1 +} + +begin=$(date +%s) +echo "Started at $(date)" + +# We need to preserve group writability so portmgr group can write +umask 002 + +#cvsup -g /root/cvs-supfile || finish 1 + +fulldate=$(date) +supdate=$(supstamp ${fulldate}) + +cat /root/ports-cvsup-master-supfile | sed "s|%%DATE%%|${supdate}|" > /root/ports-cvsup-master-supfile.now + +cvsup -L 2 /root/ports-cvsup-master-supfile.now > ${base}/ports/cvsup.log +echo ${fulldate} > /a/snap/ports/cvsdone +snapdate=$(stamp ${fulldate}) +zfs snapshot ${zbase}/ports@${snapdate} + +finish 0 |