-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path2-upload-tarballs-to-afs
executable file
·44 lines (39 loc) · 1.24 KB
/
2-upload-tarballs-to-afs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
. release-common.sh
if [[ ! -d /p/vdt/public/html/tarball-client/ && $DRY_RUN -eq 0 ]]; then
print_header "Not on UW's AFS..."
print_header "Enter username and machine name to use for scp (e.g. [email protected]):"
read rusermachine
else
# Make sure we have an AFS tokens
if ! tokens | grep -q Expires; then
echo No AFS token
exit 1
fi
fi
echo "Enter the directory containing the tarballs:"
read tarball_src
if [ ! -d $tarball_src ]; then
echo "Directory not found: $tarball_src"
exit 1
fi
for branch in ${versions[@]}; do
# drop upcoming from versions since they don't get their own tarballs
if [[ $branch = *-upcoming ]]; then
continue
fi
archs="x86_64"
for arch in $archs; do
tarball_dest="tarballs-$date_tag/$branch/$arch"
mkdir -p $tarball_dest
mv $tarball_src/osg*client-$(ver_tag $branch)*$arch*.tar.gz $tarball_dest
done
done
print_header "Copying tarballs over to UW's AFS"
if [ -d /p/vdt/public/html/tarball-client/ ]; then
cp -rv tarballs-$date_tag/* /p/vdt/public/html/tarball-client/
else
rsync -v tarballs-$date_tag/* $rusermachine:/p/vdt/public/html/tarball-client/
fi
check_file_transfer_rc $?
rm -rf tarballs-$date_tag