-
Notifications
You must be signed in to change notification settings - Fork 0
/
new-usermin-dev
executable file
·62 lines (55 loc) · 1.76 KB
/
new-usermin-dev
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
58
59
60
61
62
#!/bin/bash
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"`
old="${prog}-${oldver}-*rpm"
# Release
if [ -z $2 ]; then
rel=1
else
rel=$2
fi
prog=usermin
rpmname=${prog}-${ver}-${rel}
# RPM
# RPM
cd ${HOME}/result/vm/6/universal
curl -L -O https://download.webmin.com/devel/rpm/${rpmname}.noarch.rpm
rm -f ${HOME}/result/vm/6/universal/$old
sign-with vm6 ${rpmname}.noarch.rpm
cp ${rpmname}.noarch.rpm ${HOME}/result/vm/6/gpl/universal
rm -f ${HOME}/result/vm/6/gpl/universal/$old
cp ${rpmname}.noarch.rpm ${HOME}/result/vm/7/gpl/rpm/noarch
sign-with vm7 ${HOME}/result/vm/7/gpl/rpm/noarch/${rpmname}.noarch.rpm
rm -f ${HOME}/result/vm/7/gpl/rpm/noarch/$old
cp ${rpmname}.noarch.rpm ${HOME}/result/vm/7/pro/rpm/noarch
sign-with vm7 ${HOME}/result/vm/7/pro/rpm/noarch/${rpmname}.noarch.rpm
rm -f ${HOME}/result/vm/7/pro/rpm/noarch/$old
# tarball
cd ${HOME}/result/vm/6/wbm
curl -L -O https://download.webmin.com/devel/tarballs/${prog}-${ver}.tar.gz
rm -f ${prog}-${oldver}.tar.gz
cd ${HOME}/result/vm/6/gpl/wbm
ln -s ../../wbm/${prog}-${ver}.tar.gz
del-broken-links
for vmver in 7; do
cd ${HOME}/result/vm/$vmver/wbm
rm -f ${prog}-${oldver}.tar.gz
ln -s ../../6/wbm/${prog}-${ver}.tar.gz
del-broken-links
cd ${HOME}/result/vm/$vmver/gpl/wbm
rm -f ${prog}-${oldver}.tar.gz
ln -s ../../../6/gpl/wbm/${prog}-${ver}.tar.gz
del-broken-links
done
# Deb
cd ${HOME}/deb-tmp
curl -L -O https://download.webmin.com/devel/deb/${prog}_${ver}_all.deb
aptly repo add virtualmin-universal ${prog}_${ver}_all.deb
aptly repo add virtualmin-gpl-universal ${prog}_${ver}_all.deb
aptly repo add virtualmin-7-pro ${prog}_${ver}_all.deb
aptly repo add virtualmin-7-gpl ${prog}_${ver}_all.deb