summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
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}"