summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre-testing/libretools/PKGBUILD6
-rw-r--r--libre-testing/libretools/libretools.install30
2 files changed, 22 insertions, 14 deletions
diff --git a/libre-testing/libretools/PKGBUILD b/libre-testing/libretools/PKGBUILD
index 8f2eb8493..51d33f1cd 100644
--- a/libre-testing/libretools/PKGBUILD
+++ b/libre-testing/libretools/PKGBUILD
@@ -9,8 +9,8 @@ pkgdesc="Programs for Parabola development"
url="https://projects.parabolagnulinux.org/packages/libretools.git/"
license=('GPL3' 'GPL2')
-pkgver=20140119
-_libretools_commit=b6e66bce4dadd1a5b9f74a456de3ef5575e648fa
+pkgver=20140120.1
+_libretools_commit=641002eff37a30eb2b8237b15b74cc15b4d9f822
_devtools_commit=534d2015b45e013b37e1edbb997bd4df27d7b8fd
_packages_url=https://projects.parabolagnulinux.org/packages
@@ -87,5 +87,5 @@ package_libretools-mips64el() {
make install-libretools-mips64el DESTDIR="$pkgdir"
}
-md5sums=('459bb1e453a8acb4bdcb3dc5e36f9322'
+md5sums=('8991b27aed494b60f33c84dd48aea874'
'ec69dffa68829f063224de19bbd55fa9')
diff --git a/libre-testing/libretools/libretools.install b/libre-testing/libretools/libretools.install
index a451add36..35edf68c7 100644
--- a/libre-testing/libretools/libretools.install
+++ b/libre-testing/libretools/libretools.install
@@ -4,10 +4,14 @@ _edit_code=" 'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o
_edit_cmnt='#%s # commented out by the libretools post_install script'
_add_cmnt='# The following line is added by the libretools post_install script'
-_add_code='[[ ! -x /usr/bin/librefetch ]] || DLAGENTS+=({https,libre}"::/usr/bin/librefetch -p \"\$BUILDFILE\" -- %u %o")'
+_add_code='DLAGENTS+=({https,libre}'\''::/usr/bin/librefetch -p "$BUILDFILE" -- %u %o'\'')'
-# This line was installed by previous versions of this script
-_old_code='[[ ! -x /usr/bin/librefetch ]] || DLAGENTS+=("libre::/usr/bin/librefetch -p \"\$BUILDFILE\" %u %o")'
+# These lines were installed by previous versions of this script
+_old_code=(
+ '[[ ! -x /usr/bin/librefetch ]] || DLAGENTS+=("libre::/usr/bin/librefetch -p \"\$BUILDFILE\" %u %o")'
+ '[[ ! -x /usr/bin/librefetch ]] || DLAGENTS+=({https,libre}"::/usr/bin/librefetch -p \"\$BUILDFILE\" -- %u %o")'
+ 'DLAGENTS+=({https,libre}"::/usr/bin/librefetch -p $(printf "%q" "$BUILDFILE") -- %u %o")'
+)
# has_line $line
has_line() { grep -Fxq -- "$1" etc/makepkg.conf; }
@@ -32,13 +36,14 @@ rep_line() {
post_install() {
if grep -q 'librefetch' etc/makepkg.conf; then
libremessages msg2 "libretools: librefetch is already in /etc/makepkg.conf"
- if has_line "$_old_code"; then
- libremessages msg2 "libretools: removing old librefetch entry in /etc/makepkg.conf"
- del_line "$_old_code"
- post_install
- else
- return 0
- fi
+ local line del=false
+ for line in "${_old_code[@]}"; do
+ if has_line "$line"; then
+ pre_remove
+ post_install
+ return $?
+ fi
+ done
else
libremessages msg2 "libretools: adding librefetch to /etc/makepkg.conf"
rep_line "$_edit_code" "$(printf "$_edit_cmnt" '&')"
@@ -60,5 +65,8 @@ pre_remove() {
del_line "$_add_cmnt"
del_line "$_add_code"
- del_line "$_old_code"
+ local line
+ for line in "${_old_code[@]}"; do
+ del_line "$line"
+ done
}