summaryrefslogtreecommitdiff
path: root/bin/ups
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-01-26 08:23:02 +0100
committerAnton Khirnov <anton@khirnov.net>2021-01-26 08:23:02 +0100
commit436ad7e2ae90dd1195e63f90976dc7abdca205ef (patch)
treee12eab733c3635ef3dafc10db0375993fc72f9d0 /bin/ups
parenteb70ffb5a3c3b043f31115afc2b18e8ae6f34d92 (diff)
bin/up(s): use full path to file instead of just basename
Diffstat (limited to 'bin/ups')
-rwxr-xr-xbin/ups6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ups b/bin/ups
index 8353f44..75c386b 100755
--- a/bin/ups
+++ b/bin/ups
@@ -2,10 +2,10 @@
# ups.khirnov.net uploader
if [ "$1" ]; then
- fname=$(basename "$1")
+ fpath=$1
else
- fname="-"
+ fpath="-"
fi
-url=$(curl -sS -E ~/.local/var/up/cert --data-binary "@${fname}" "https://ups.khirnov.net/${fname}")
+url=$(curl -sS -E ~/.local/var/up/cert --data-binary "@${fpath}" "https://ups.khirnov.net/${fpath}")
[ "${url}" ] && echo "${url}"