summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-01-20 11:37:40 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-01-20 11:37:40 -0500
commit904702fba288da6c95044b528911966613e54935 (patch)
treeccb8aa5291d7d20739ea440d211e3ded1ae4e940
parentc54c481b5b7a1cb7d4a201fad9450d3abb198742 (diff)
librefetch: fix the %u bug by deferring variable evaluation until the eval.
-rwxr-xr-xsrc/librefetch/librefetch4
-rw-r--r--src/librefetch/librefetch.8.ronn5
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)