blob: eb20004aa880acd1f894bf305aa84ba4cfd477b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/bash
curl "http://www.dynare.org/release/source/MD5SUMS" | tail -n 1 > md5list.txt
read -a words < md5list.txt
# replace md5hash
sed "s/md5sums=('.*')/md5sums=('${words[0]}')/" PKGBUILD > PKGBUILD
# replace version
dynarever="$(echo "${words[1]}" | sed 's/.tar.xz//')"
dynarever="$(echo $dynarever | sed 's/dynare-//')"
sed "s/pkgver=[0-9].[0-9].[0-9]/pkgver=${dynarever}/g" PKGBUILD > PKGBUILD
# update
makepkg --printsrcinfo > .SRCINFO
#git add PKGBUILD .SRCINFO
#git commit -c="Updated to ${dynarever}"
#git push
|