aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-04-27 01:59:38 +0200
committerGravatar Tom Willemse2014-04-27 01:59:38 +0200
commit424a165de583145656919a40c043f8ae399253ea (patch)
treea38c579932800d3c7577a0d066f0857d32ac3545
parent26e5381fc499cdedaa6818a0726189c6ba10b91e (diff)
downloadhypo-cli-424a165de583145656919a40c043f8ae399253ea.tar.gz
hypo-cli-424a165de583145656919a40c043f8ae399253ea.zip
Use a local variable for sendfile
-rwxr-xr-xhypo4
1 files changed, 2 insertions, 2 deletions
diff --git a/hypo b/hypo
index 14df732..40a9e43 100755
--- a/hypo
+++ b/hypo
@@ -38,14 +38,14 @@ function help_send
function cmd_send
{
+ local sendfile="$1"
+
if [[ ! -t 0 ]]; then
sendfile="$(mktemp --suffix ${1-.txt})"
cat - > "$sendfile"
elif [[ -z "$1" ]]; then
cmd_help "send"
exit 1
- else
- sendfile="$1"
fi
curl --upload-file "$sendfile" "$URL/"