diff options
Diffstat (limited to 'bumpVersion')
-rwxr-xr-x | bumpVersion | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bumpVersion b/bumpVersion index d06598665..bea54613e 100755 --- a/bumpVersion +++ b/bumpVersion @@ -12,16 +12,18 @@ then exit ${err} fi +paket="${1%/}" + cd "$(dirname "$(readlink -f "$0")")" -[ -r "$1/PKGBUILD" ] || exit 1 -eval $(./checkVersions -m "$1") +[ -r "${paket}/PKGBUILD" ] || exit 1 +eval $(./checkVersions -m "${paket}") 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 +cd "${paket}" + sed 's|pkgver=.*$|pkgver='"${remVer}"'|; s|pkgrel=.*$|pkgrel=1|; s@^\s*\(sha[[:digit:]]\+sums\|md5sums\)=@sha512sums=@ @@ -41,4 +43,4 @@ sed 's|sha512sums=.*$|'"${summen}"'|' -i PKGBUILD rm -rf pkg src sudo pacman -Sy makepkg -fcsr || exit 1 -git commit PKGBUILD -m "$1 ${pkgver} -> ${remVer}" +git commit PKGBUILD -m "${paket} ${pkgver} -> ${remVer}" |