diff options
author | Erich Eckner <git@eckner.net> | 2016-04-18 15:28:57 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-04-18 15:28:57 +0200 |
commit | 558f30601963f54deb3c42d22d72e3a973c363c4 (patch) | |
tree | 111b86c7d88bf53dbc0ffcdb0d35a4162c0edd80 /bumpVersion | |
parent | daa1798475d9e393ca4c01fb64ec13fca25d751e (diff) | |
download | archlinuxewe-558f30601963f54deb3c42d22d72e3a973c363c4.tar.xz |
Version-Update-Script "bumpVersions" neu
Diffstat (limited to 'bumpVersion')
-rwxr-xr-x | bumpVersion | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/bumpVersion b/bumpVersion new file mode 100755 index 000000000..e2e1a80f0 --- /dev/null +++ b/bumpVersion @@ -0,0 +1,38 @@ +#!/bin/bash + +if [ $# -ne 1 ] +then + err=0 + for pkg in "$@" + do + $0 "${pkg}" + cErr=$? + [ ${cErr} -gt ${err} ] && err=${cErr} + done + exit ${err} +fi + +cd "$(dirname "$(readlink -f "$0")")" +[ -r "$1/PKGBUILD" ] || exit 1 +eval $(./checkVersions -m "$1") +if [ "${remVer}" == "${pkgver}" ] +then + exit 0 +fi + +cd "$1" +# sed ':begin;$!N;s@^\s*\(sha[[:digit:]]\+sums=\|md5sums=\)\([^)]*\)\n\(.*\)$@sha512sums=\2 \3@;tbegin;P;D' PKGBUILD +sed 's|pkgver=.*$|pkgver='"${remVer}"'|; + s|pkgrel=.*$|pkgrel=1|; + :begin; + $!N;s@^\s*\(sha[[:digit:]]\+sums=\|md5sums=\)\([^)]*\)\n\(.*\)$@sha512sums=\2 \3@; + tbegin; + P; + D +' -i PKGBUILD +summen="$(makepkg -g)" +sed 's|sha512sums=.*$|'"${summen}"'|' -i PKGBUILD + +rm -rf pkg src +sudo pacman -Sy +makepkg -fcsr |