summarylogtreecommitdiffstats
path: root/bump.sh
blob: 7279b3894e1408329aec0343b2f96869626c8926 (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/brocode/fblog/archive/v$VERSION.tar.gz"
NAME="fblog"
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