-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupdate-lxqt
executable file
·57 lines (51 loc) · 1.71 KB
/
update-lxqt
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
# Usage: update-kapps version [startfrom]
# version: KDE Applications version to update to
# startfrom: Package to start from (e.g. to continue where
# a previous build left off because of a patch rebase
# or file list issue)
#
# (C) 2015 Bernhard Rosenkränzer <[email protected]>
# Released under the terms of the GPLv3
error() {
echo "$1 failed to build -- please see above and fix."
exit 1
}
if [ "$#" -lt 1 ]; then
echo "Specify the version to update to"
exit 1
fi
VERSION="$1"
PACKAGES="$(cat $(dirname $0)/lxqt.buildlist |sed -e 's,openmandriva/,,g' | grep -v ^#)"
REALVERSION="${VERSION}"
if [ "$#" -ge 2 ]; then
P=""
RELEVANT=0
for i in $PACKAGES; do
[ "$i" = "$2" ] && RELEVANT=1
[ "$RELEVANT" = "1" ] && P="$P $i"
done
PACKAGES="$P"
fi
for i in $PACKAGES; do
rm -rf ${i}
git clone [email protected]:/openmandriva/${i}.git || error $i
cd ${i}
OLDVERSION="$(grep -i '^Version[[:space:]]*:' *.spec |cut -d: -f2 |xargs echo)"
OLDEXP="$(echo ${OLDVERSION} |sed -e 's,\.,\\.,g')"
sed -i -e "/${OLDEXP}\.tar/d" .abf.yml
PKGVERSION=${VERSION}
sed -i -e "s,^\(Version.*:.*\)${OLDEXP},\1${PKGVERSION}," *.spec
sed -i -e "s,^\(Release.*:\s*\)[0-9]*,\11," *.spec
wget https://downloads.lxqt.org/lxqt/${PKGVERSION}/${i}-${PKGVERSION}.tar.xz || error $i
sha1sum ${i}-${PKGVERSION}.tar.xz | awk '{print " "$2": " $1}' >> .abf.yml || error $i
abf store *-${PKGVERSION}.tar* || error $i
rm -rf ${i}-${PKGVERSION}.tar.xz
git commit -am "Update to ${PKGVERSION}" || error $i
git push origin master
git remote set-url --add --push origin [email protected]:OpenMandrivaAssociation/${i}.git
git push
cd ..
VERSION="${REALVERSION}"
done
abf chain_build -b master --update-type enhancement -i $(dirname $0)/lxqt.buildlist