summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/get.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/get.sh b/include/get.sh
index a3328454..7c799411 100644
--- a/include/get.sh
+++ b/include/get.sh
@@ -77,12 +77,13 @@ xbget()
[ "$1" = "curl" ] || [ "$1" = "copy" ] || [ "$1" = "git" ] || \
err "Bad dlop (arg 1): xbget $*"
- echk="f" && [ "$1" = "git" ] && echk="d"
-
for url in "$2" "$3"; do
[ -n "$url" ] || err "empty URL given in: xbget $*"
try_file "$url" "$@" || continue
- eval "[ -$echk \"$4\" ] || continue"
+ case "$1" in
+ git) [ -d "$4" ] || continue ;;
+ *) [ -f "$4" ] || continue ;;
+ esac
return 0 # successful download/copy
done
err "$1 $2 $3 $4: not downloaded"; :