diff options
Diffstat (limited to 'src/librefetch')
-rwxr-xr-x | src/librefetch/librefetch | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch index 61fc3ad..a477315 100755 --- a/src/librefetch/librefetch +++ b/src/librefetch/librefetch @@ -151,8 +151,10 @@ main() { fi local dlcmd="${DOWNLOADER}" - dlcmd="${dlcmd//\%o/\"$dst\"}" - dlcmd="${dlcmd//\%u/\"$src\"}" + [[ $dlcmd = *%u* ]] || dlcmd="$dlcmd %u" + dlcmd="${dlcmd//\%o/$(printf '%q' "$dst")}" + dlcmd="${dlcmd//\%u/$(printf '%q' "$src")}" + { eval "$dlcmd"; } >> /dev/stderr && return 0 fi |