1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

Add extra argument md5 for bindist.tar. Skip scp if md5 matches

what the client already has.
This commit is contained in:
Satoshi Asami 1999-09-11 00:11:12 +00:00
parent 9a4b76df92
commit 0a15669df6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=21637

View File

@ -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