freebsd-ports/Tools/portbuild/scripts/cpdistfiles
Satoshi Asami 8dc4353d1b Remove bak/distfiles after it's done -- this script is now called in
the background with bak/distfiles to work with (so that the new
package build can run in parallel).
2000-08-29 07:52:55 +00:00

34 lines
765 B
Bash
Executable file

#!/bin/sh
# configurable variables
rhost=ftp.freebsd.org
ruser=asami
rdir=w/ports/distfiles
pb=/a/asami/portbuild
unset DISPLAY
# copy one distfile to remote host
cpdistfile () {
tar -C distfiles -cf - $1 | ssh $rhost -l $ruser tar -C $rdir -xvf -
}
echo "================================================"
echo "md5 generation started at $(date)"
cd $pb/bak/distfiles
find . -type f | sort | xargs md5 > ../../md5-2
echo "================================================"
echo "copying started at $(date)"
cd $pb/bak
for i in $(diff ../md5 ../md5-2 | grep '^>' | sed -e 's^.*(\./^^' -e 's/).*//'); do
cpdistfile $i
done
mv ../md5-2 ../md5
sudo rm -rf $pb/bak/distfiles
echo "================================================"
echo "all done at $(date)"