diff --git a/bin/cget.sh b/bin/cget.sh index 13e0942..8676641 100755 --- a/bin/cget.sh +++ b/bin/cget.sh @@ -223,7 +223,7 @@ tmp_file="${TMP_DIR}/http_resource_$$.xml" # in library file http_tools.sh. # $verbose_mode && printf "$script_name requesting resource: %s\n" "$location" -conditional_get $local_opts -d "$CACHE_DIR" -t "$TMP_DIR" "$location" > "$tmp_file" +conditional_get $local_opts -d "$CACHE_DIR" -T "$TMP_DIR" "$location" > "$tmp_file" exit_code=$? if [ $exit_code -ne 0 ]; then if [ $exit_code -gt 1 ]; then diff --git a/lib/http_tools.sh b/lib/http_tools.sh index 04fed79..c537517 100755 --- a/lib/http_tools.sh +++ b/lib/http_tools.sh @@ -30,7 +30,7 @@ fi # response body. If the server responds with 304, return the cached # resource instead. # -# Usage: conditional_get [-v] [-F | -C] -d CACHE_DIR -t TMP_DIR HTTP_LOCATION +# Usage: conditional_get [-v] [-F | -C] -d CACHE_DIR -T TMP_DIR HTTP_LOCATION # # This function requires two option arguments (CACHE_DIR and TMP_DIR) # and a command-line argument (HTTP_LOCATION). The rest of the command @@ -41,7 +41,7 @@ fi # -F force the return of a fresh resource # -C check the cache only # -d the cache directory (REQUIRED) -# -t a temporary directory (REQUIRED) +# -T a temporary directory (REQUIRED) # # Use option -F or -C to alter the default behavior of the function. # @@ -124,7 +124,7 @@ conditional_get () { local opt local OPTARG local OPTIND - while getopts ":vFCd:t:" opt; do + while getopts ":vFCd:T:" opt; do case $opt in v) verbose_mode=true @@ -140,7 +140,7 @@ conditional_get () { d) cache_dir="$OPTARG" ;; - t) + T) tmp_dir="$OPTARG" ;; \?)