Skip to content

Commit

Permalink
Standardize TMP_DIR option
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Scavo committed Dec 19, 2016
1 parent c7f16c0 commit eba58aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/cget.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions lib/http_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
#
Expand Down Expand Up @@ -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
Expand All @@ -140,7 +140,7 @@ conditional_get () {
d)
cache_dir="$OPTARG"
;;
t)
T)
tmp_dir="$OPTARG"
;;
\?)
Expand Down

0 comments on commit eba58aa

Please sign in to comment.