diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2010-08-21 12:02:11 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2010-10-02 11:56:29 -0400 |
commit | e0e443e5c5bbd7663542788401d0e44da91e301e (patch) | |
tree | e74e930ddac1eece035d9a9d2aa08d9fe28c9b97 /examples/data/scripts/download.sh | |
parent | a2901d469cacd317e8995486401f363bc569d37c (diff) |
Use -z and -n tests rather than "x$foo" = "x" hack
Diffstat (limited to 'examples/data/scripts/download.sh')
-rwxr-xr-x | examples/data/scripts/download.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/data/scripts/download.sh b/examples/data/scripts/download.sh index f2ee4a8..7375535 100755 --- a/examples/data/scripts/download.sh +++ b/examples/data/scripts/download.sh @@ -13,7 +13,10 @@ url="$1" http_proxy="$2" export http_proxy -test "x$url" = "x" && { echo "you must supply a url! ($url)"; exit 1; } +if [ -z "$url" ]; then + echo "you must supply a url! ($url)" + exit 1 +fi # only changes the dir for the $get sub process if echo "$url" | grep -E '.*\.torrent' >/dev/null; then |