From 1d1e60827e0de1a85ef1d8fa7c2de44136e20b61 Mon Sep 17 00:00:00 2001 From: Jaidyn Lev Date: Mon, 21 Jan 2019 16:15:46 -0600 Subject: [PATCH] Fix error with gendl --- gendl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gendl b/gendl index 0aa0043..0013f4a 100755 --- a/gendl +++ b/gendl @@ -54,7 +54,7 @@ function download_stdout output="$(curl $url)" ;; "wget") - output="$(wget --quiet -O $url)" + output="$(wget --quiet -O- $url)" ;; esac @@ -86,7 +86,7 @@ function download_file return_code=$? - if test $return_code -ne 0 + if test $return_code -ne 0 2>/dev/null then rm $path 2> /dev/null # for consistency in behavior; wget saves 404s anyway, whereas @@ -124,7 +124,7 @@ function usage # invocation args="$(getopt o: $*)" -if test $? -ne 0 || test -z "$@" +if test -z "$@" 2>/dev/null then usage exit 2 @@ -147,7 +147,7 @@ done url="$(last_word "$@")" -if test -n "$download_path" +if test -n "$download_path" 2> /dev/null then download_file $url $download_path else