summarylogtreecommitdiffstats
path: root/bump.sh
blob: 1f62d7951596f9b8af9aa445901b41d2f5fccad7 (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 -x -e -u -o pipefail

VERSION=$1
PKGREL=${2:-1}
SOURCE="https://github.com/comtrya/comtrya/archive/v$VERSION.tar.gz"
NAME="fw"
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