-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhtcondor-archive
executable file
·54 lines (47 loc) · 2.19 KB
/
htcondor-archive
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
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
if [ "$#" != 1 ]; then
echo "Usage: $0 <release-number>"
exit 1;
fi
# The whole version number (3 numbers separated by periods)
version="$1"
# shellcheck disable=SC2206 # don't have to worry abour word splitting
AVERSION=(${version//./ })
MAJOR_VER=${AVERSION[0]}
MINOR_VER=${AVERSION[1]}
PATCH_VER=${AVERSION[2]}
if [ "$MINOR_VER" -eq 0 ]; then
ver=$MAJOR_VER.0
else
ver=$MAJOR_VER.x
fi
rm -rf /nobackup/tim/htcondor-archive/$version
if [ -d /nobackup/tim/htcondor-archive/$version ]; then
echo "/nobackup/tim/htcondor-archive/$version already exists!"
exit 1
fi
mkdir /nobackup/tim/htcondor-archive/$version
mkdir /nobackup/tim/htcondor-archive/$version/manual
mkdir /nobackup/tim/htcondor-archive/$version/tarballs
mkdir /nobackup/tim/htcondor-archive/$version/rpm
mkdir /nobackup/tim/htcondor-archive/$version/debian
mkdir /nobackup/tim/htcondor-archive/$version/ubuntu
if [ $MINOR_VER -eq 0 ]; then
tag='lts'
else
tag='latest'
fi
# tag="v$version"
echo Copying Manual...
wget https://htcondor.readthedocs.io/_/downloads/en/$tag/htmlzip/ -O /nobackup/tim/htcondor-archive/$version/manual/index.html.zip
wget https://htcondor.readthedocs.io/_/downloads/en/$tag/pdf/ -O /nobackup/tim/htcondor-archive/$version/manual/htcondor-${version}.pdf
wget https://htcondor.readthedocs.io/_/downloads/en/$tag/epub/ -O /nobackup/tim/htcondor-archive/$version/manual/htcondor-${version}.epub
echo Copying tarballs...
(cd /p/condor/public/html/htcondor/tarball/$ver/$version/release; cp -av * /nobackup/tim/htcondor-archive/$version/tarballs/)
echo Copying RPMs from RPM repository...
(cd /p/condor/public/html/htcondor/repo; tar cf - $(find -L $ver* -name \*$version-1\*) | (cd /nobackup/tim/htcondor-archive/$version/rpm; tar xvfp -))
echo Copying debs from Debian repository...
(cd /p/condor/public/html/htcondor/repo; tar cf - $(find -L debian/$ver* -name \*$version-1\*) | (cd /nobackup/tim/htcondor-archive/$version/debian; tar xvfp -))
echo Copying debs from Ubuntu repository...
(cd /p/condor/public/html/htcondor/repo; tar cf - $(find -L ubuntu/$ver* -name \*$version-1\*) | (cd /nobackup/tim/htcondor-archive/$version/ubuntu; tar xvfp -))
du -shx /nobackup/tim/htcondor-archive/$version/*