aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/portbuild
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1999-09-11 08:11:12 +0800
committerasami <asami@FreeBSD.org>1999-09-11 08:11:12 +0800
commit60a39b195853483ccaba0bb060e1c19a9798abd6 (patch)
treea24aa250d6b387bb07be96c547fe80078b445a88 /Tools/portbuild
parent8711848f6276041dedbe43301060a1baab1dcd1a (diff)
downloadfreebsd-ports-gnome-60a39b195853483ccaba0bb060e1c19a9798abd6.tar.gz
freebsd-ports-gnome-60a39b195853483ccaba0bb060e1c19a9798abd6.tar.zst
freebsd-ports-gnome-60a39b195853483ccaba0bb060e1c19a9798abd6.zip
Add extra argument md5 for bindist.tar. Skip scp if md5 matches
what the client already has.
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-xTools/portbuild/scripts/setupnode12
1 files changed, 9 insertions, 3 deletions
diff --git a/Tools/portbuild/scripts/setupnode b/Tools/portbuild/scripts/setupnode
index 72dcb01908de..d41a8422bcfd 100755
--- a/Tools/portbuild/scripts/setupnode
+++ b/Tools/portbuild/scripts/setupnode
@@ -1,6 +1,6 @@
#!/bin/sh
-if [ $# != 3 ]; then
- echo "usage: $0 master portbuilddir branch"
+if [ $# != 4 ]; then
+ echo "usage: $0 master portbuilddir branch md5"
exit 1
fi
if [ $(echo $(/sbin/mount | grep "$2/.*(read-only)" | awk '{print $3}' | wc -c)) != 0 ]; then
@@ -8,4 +8,10 @@ if [ $(echo $(/sbin/mount | grep "$2/.*(read-only)" | awk '{print $3}' | wc -c))
fi
rm -rf $2/*/chroot/*
scp -p -a $1:$2/scripts/portbuild $2/scripts
-scp -p -a $1:$2/$3/tarballs/bindist.tar $2/$3/tarballs
+md5=$(/sbin/md5 $2/$3/tarballs/bindist.tar | awk '{print $4}')
+if [ "$md5" = "$4" ]; then
+ echo "not copying bindist to $(hostname -s) since it is already up to date"
+else
+ echo "copying bindist to $(hostname -s)"
+ scp -p -a $1:$2/$3/tarballs/bindist.tar $2/$3/tarballs
+fi