summaryrefslogtreecommitdiff
path: root/bin
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
parenteb70ffb5a3c3b043f31115afc2b18e8ae6f34d92 (diff)
bin/up(s): use full path to file instead of just basename
Diffstat (limited to 'bin')
-rwxr-xr-xbin/up6
-rwxr-xr-xbin/ups6
2 files changed, 6 insertions, 6 deletions
diff --git a/bin/up b/bin/up
index 52d9548..7d68980 100755
--- a/bin/up
+++ b/bin/up
@@ -1,10 +1,10 @@
#!/bin/bash
# up.khirnov.net 0x0 instance
if [ "$1" ]; then
- fname=$(basename "$1")
+ fpath=$1
else
- fname="-"
+ fpath="-"
fi
-url=$(curl -sS -E ~/.local/var/up/cert -F "file=@${fname}" "https://up.khirnov.net/")
+url=$(curl -sS -E ~/.local/var/up/cert -F "file=@${fpath}" "https://up.khirnov.net/")
[ "${url}" ] && echo "${url}"
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}"