Fix error with gendl

This commit is contained in:
Jaidyn Lev 2019-01-21 16:15:46 -06:00
parent 8ad9ecb5da
commit 1d1e60827e

8
gendl
View File

@ -54,7 +54,7 @@ function download_stdout
output="$(curl $url)" output="$(curl $url)"
;; ;;
"wget") "wget")
output="$(wget --quiet -O $url)" output="$(wget --quiet -O- $url)"
;; ;;
esac esac
@ -86,7 +86,7 @@ function download_file
return_code=$? return_code=$?
if test $return_code -ne 0 if test $return_code -ne 0 2>/dev/null
then then
rm $path 2> /dev/null rm $path 2> /dev/null
# for consistency in behavior; wget saves 404s anyway, whereas # for consistency in behavior; wget saves 404s anyway, whereas
@ -124,7 +124,7 @@ function usage
# invocation # invocation
args="$(getopt o: $*)" args="$(getopt o: $*)"
if test $? -ne 0 || test -z "$@" if test -z "$@" 2>/dev/null
then then
usage usage
exit 2 exit 2
@ -147,7 +147,7 @@ done
url="$(last_word "$@")" url="$(last_word "$@")"
if test -n "$download_path" if test -n "$download_path" 2> /dev/null
then then
download_file $url $download_path download_file $url $download_path
else else