From 904702fba288da6c95044b528911966613e54935 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 20 Jan 2014 11:37:40 -0500 Subject: librefetch: fix the %u bug by deferring variable evaluation until the eval. --- src/librefetch/librefetch | 4 ++-- src/librefetch/librefetch.8.ronn | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch index 5556ddd..443b4f6 100755 --- a/src/librefetch/librefetch +++ b/src/librefetch/librefetch @@ -158,8 +158,8 @@ main() { local dlcmd="${DOWNLOADER}" [[ $dlcmd = *%u* ]] || dlcmd="$dlcmd %u" - dlcmd="${dlcmd//\%o/$(printf '%q' "$dst")}" - dlcmd="${dlcmd//\%u/$(printf '%q' "$src")}" + dlcmd="${dlcmd//\%o/"\$dst"}" + dlcmd="${dlcmd//\%u/"\$src"}" { eval "$dlcmd"; } >&2 && return 0 fi diff --git a/src/librefetch/librefetch.8.ronn b/src/librefetch/librefetch.8.ronn index c7247d5..7d2dfb3 100644 --- a/src/librefetch/librefetch.8.ronn +++ b/src/librefetch/librefetch.8.ronn @@ -182,11 +182,6 @@ The following modifications are made to makepkg: See `librefetch.conf(5)` for details on configuring librefetch using the `librefetch.conf` file. -## BUGS - -In download mode, if the local download location contains the string -`%u`, it will be replaced by the URL being downloaded from. - ## SEE ALSO librefetch.conf(5), makepkg(8), PKGBUILD(5), SRCBUILD(5) -- cgit v1.2.2