mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-01 01:17:02 +00:00
03455d1bf9
* Require a branch argument * Use tar --unlink when copying distfiles
40 lines
811 B
Bash
Executable File
40 lines
811 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ $# != 1 ]; then
|
|
echo "usage: $0 branch"
|
|
exit 1
|
|
fi
|
|
|
|
# configurable variables
|
|
pb=/var/portbuild
|
|
|
|
. ${pb}/portbuild.conf
|
|
|
|
unset DISPLAY
|
|
|
|
branch=$1
|
|
shift
|
|
|
|
# copy one distfile to remote host
|
|
cpdistfile () {
|
|
tar -C distfiles -cf - $1 | ssh $ftpsite -l $user tar -C $distfiledir --unlink -xvf -
|
|
}
|
|
|
|
echo "================================================"
|
|
echo "md5 generation started at $(date)"
|
|
|
|
cd $pb/${branch}/bak/distfiles
|
|
find . -type f | sort | xargs md5 > ../../md5-2
|
|
|
|
echo "================================================"
|
|
echo "copying started at $(date)"
|
|
|
|
cd $pb/${branch}/bak
|
|
for i in $(diff ../md5 ../md5-2 | grep '^>' | sed -e 's^.*(\./^^' -e 's/).*//'); do
|
|
cpdistfile $i
|
|
done
|
|
mv ../md5-2 ../md5
|
|
|
|
echo "================================================"
|
|
echo "all done at $(date)"
|