-
Notifications
You must be signed in to change notification settings - Fork 0
/
devel-webmin
executable file
·58 lines (51 loc) · 1.65 KB
/
devel-webmin
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
55
56
57
#!/bin/sh
if [ -z $1 ]; then
echo "No version provided. Exiting."
exit 1
fi
ver=$1
# XXX This will fail on devel releases
oldver=`bc <<< "scale=4; ${ver}-0.020"`
if [ -z $2 ]; then
rel=1
else
rel=$2
fi
prog=webmin
rpmname=${prog}-${ver}-${rel}
# RPM
cd ${HOME}/result/universal
curl -L -O https://download.webmin.com/devel/rpm/${rpmname}.noarch.rpm
old=`repomanage --keep=2 --old . | grep ${prog}`
rm -f $old
cp ${rpmname}.noarch.rpm ${HOME}/result/vm/6/universal
cd ${HOME}/result/vm/6/universal
rm -f $old
cd ${HOME}/result/gpl/universal
ln -sf ../../universal/${rpmname}.noarch.rpm .
rm -f $old
cd ${HOME}/result/vm/6/gpl/universal
ln -sf ../../universal/${rpmname}.noarch.rpm .
rm -f $old
# tarball
cd ${HOME}/result/wbm
curl -L -O https://download.webmin.com/devel/tarballs/${prog}-${ver}.tar.gz
rm ${prog}-${oldver}.tar.gz
cd ${HOME}/result/gpl/wbm
ln -s ../../wbm/${prog}-${ver}.tar.gz
del-broken-links
# Deb
cd ${HOME}/result/debian/dists/virtualmin-universal/main/binary-i386
curl -L -O https://download.webmin.com/devel/deb/${prog}_${ver}_all.deb
cp ${prog}_${ver}_all.deb ../binary-amd64
rm ${prog}_${oldver}_all.deb
cp ${prog}_${ver}_all.deb ${HOME}/result/gpl/debian/dists/virtualmin-universal/main/binary-i386
cp ${prog}_${ver}_all.deb ${HOME}/result/gpl/debian/dists/virtualmin-universal/main/binary-amd64
cd ../binary-amd64
rm ${prog}_${oldver}_all.deb
cd ${HOME}/result/gpl/debian/dists/virtualmin-universal/main/binary-i386
del-broken-links
cd ${HOME}/result/gpl/debian/dists/virtualmin-universal/main/binary-amd64
del-broken-links
aptly repo add virtualmin-universal ${prog}_${ver}_all.deb
aptly repo add virtualmin-gpl-universal ${prog}_${ver}_all.deb