summarylogtreecommitdiffstats
path: root/bump.sh
blob: 8824fa7755fd3c9c62460c29cc0f3a437112aeae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
set -e -u -o pipefail

VERSION=$1
PKGREL=${2:-1}
SOURCE="https://github.com/bomgar/fbmirrors/archive/v$VERSION.tar.gz"
NAME="fbmirrors"
SHA256=$(curl -L --silent --fail $SOURCE  | sha256sum | awk '{print $1}')

rm -f $NAME*



sed -e "s#__VERSION__#$VERSION#g" \
    -e "s#__SOURCE__#$SOURCE#g" \
    -e "s#__SHA256__#$SHA256#g" \
    -e "s#__PKGREL__#$PKGREL#g" \
    PKGBUILD.tmpl > PKGBUILD

makepkg --printsrcinfo > .SRCINFO
makepkg