summaryrefslogtreecommitdiff
path: root/Tools/portbuild/scripts/cpdistfiles
blob: 84e69ef64afc661b3c9beb0b1a06b37b37eeadb3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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 -
}

cd $pb/distfiles
find . -type f | sort | xargs md5 > ../md5-2
cd $pb
for i in $(diff md5 md5-2 | grep '^>' | sed -e 's^.*(\./^^' -e 's/).*//'); do
  cpdistfile $i
done
mv md5-2 md5