summarylogtreecommitdiffstats
path: root/update.sh
blob: 67cfb7c623612df73a8f33925f9de45e1e33df37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
if [ $# -lt 1 -o $# -gt 2 ]
then
    echo >&2 "usage: $0 <PKGVER> [PKGREL]"
    exit 1
fi

set -e
PKGVER="$1"
PKGREL="${2:-1}"

echo >&2 "updating PKGBUILD versions..."
sed -i "s/^pkgver=.*/pkgver='$PKGVER'/" PKGBUILD
sed -i "s/^pkgrel=.*/pkgrel=$PKGREL/" PKGBUILD

echo >&2 "running 'updpkgsums' to update checksums..."
updpkgsums

echo >&2 "running 'updpkgsums' to update .SRCINFO..."
makepkg --printsrcinfo > .SRCINFO

echo >&2 "running 'makepkg -f' to test build..."
makepkg -f