index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Ethan Sommer <e5ten.arch@gmail.com> | 2019-11-05 20:29:11 -0500 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-11-06 12:03:38 +1000 |
commit | 3a814ee6bca9ee24a868c0dc032b321048a53e08 (patch) | |
tree | 5d1722228354306d2820b0bc169e15c950f19a32 /scripts | |
parent | 424129e8d1e91987a9799a49391f1271b069c5cf (diff) |
-rw-r--r-- | scripts/Makefile.am | 2 | ||||
-rw-r--r-- | scripts/makepkg.sh.in | 8 |
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 63d09767..3cb6c133 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -186,8 +186,6 @@ edit = sed \ -e 's|@DEBUGSUFFIX[@]|$(DEBUGSUFFIX)|g' \ -e "s|@INODECMD[@]|$(INODECMD)|g" \ -e "s|@FILECMD[@]|$(FILECMD)|g" \ - -e 's|@SEDINPLACEFLAGS[@]|$(SEDINPLACEFLAGS)|g' \ - -e 's|@SEDPATH[@]|$(SEDPATH)|g' \ -e 's|@SCRIPTNAME[@]|$@|g' \ -e 's|@configure_input[@]|Generated from $<; do not edit by hand.|g' diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index c49ac57a..22df1b9f 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -199,13 +199,15 @@ update_pkgver() { fi if [[ -n $newpkgver && $newpkgver != "$pkgver" ]]; then - if [[ -f $BUILDFILE && -w $BUILDFILE ]]; then - if ! @SEDPATH@ @SEDINPLACEFLAGS@ "s:^pkgver=[^ ]*:pkgver=$newpkgver:" "$BUILDFILE"; then + if [[ -w $BUILDFILE ]]; then + mapfile -t buildfile < "$BUILDFILE" + buildfile=("${buildfile[@]/#pkgver=*([^ ])/pkgver=$newpkgver}") + buildfile=("${buildfile[@]/#pkgrel=*([^ ])/pkgrel=1}") + if ! printf '%s\n' "${buildfile[@]}" > "$BUILDFILE"; then error "$(gettext "Failed to update %s from %s to %s")" \ "pkgver" "$pkgver" "$newpkgver" exit $E_PKGBUILD_ERROR fi - @SEDPATH@ @SEDINPLACEFLAGS@ "s:^pkgrel=[^ ]*:pkgrel=1:" "$BUILDFILE" source_safe "$BUILDFILE" local fullver=$(get_full_version) msg "$(gettext "Updated version: %s")" "$pkgbase $fullver" |