diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-01-20 11:37:40 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-01-20 11:37:40 -0500 |
commit | 904702fba288da6c95044b528911966613e54935 (patch) | |
tree | ccb8aa5291d7d20739ea440d211e3ded1ae4e940 /src/librefetch/librefetch | |
parent | c54c481b5b7a1cb7d4a201fad9450d3abb198742 (diff) |
librefetch: fix the %u bug by deferring variable evaluation until the eval.
Diffstat (limited to 'src/librefetch/librefetch')
-rwxr-xr-x | src/librefetch/librefetch | 4 |
1 files changed, 2 insertions, 2 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 |