diff options
author | Mark Ferrell <major@homeonderanged.org> | 2014-03-04 10:22:00 -0800 |
---|---|---|
committer | Mark Ferrell <major@homeonderanged.org> | 2014-03-04 10:22:00 -0800 |
commit | 99a4f44e0a3a7529ed395957c31810a205f5db5a (patch) | |
tree | 8ed0e08e6773b2a5f2fbc4c267329576b13b143b | |
parent | 7863096ba8e9ac1541e7fa89882ee28ef53d4121 (diff) |
Add usage information build-fetch
-rwxr-xr-x | builder/build-fetch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/builder/build-fetch b/builder/build-fetch index 64fe5a2..ea50e61 100755 --- a/builder/build-fetch +++ b/builder/build-fetch @@ -1,5 +1,19 @@ #!/usr/bin/env build +usage() +{ +cat<<END_OF_USAGE +usage: ${0##*/} [options] <url> + +options: + + -N, --name Return the filename portion of the URL + -V, --var Return the variable portion of the URL + -h, --help Display this help + +END_OF_USAGE +} + build_fetch_clean() { for arg in ${BUILD_FETCH_CLEAN}; do @@ -219,6 +233,14 @@ build_fetch_http() unset build_fetch_http_file } + +# Look for requests for help "anywhere" in the command line +for arg; do + case "${arg}" in + (-h|-help|--help) usage; exit 0;; + esac +done + FETCH_ACTION="fetch" while [ "$#" -gt "0" ]; do case "${1}" in |