summaryrefslogtreecommitdiff
path: root/dotfiles
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles')
-rw-r--r--dotfiles/profile9
1 files changed, 7 insertions, 2 deletions
diff --git a/dotfiles/profile b/dotfiles/profile
index c218116..749f360 100644
--- a/dotfiles/profile
+++ b/dotfiles/profile
@@ -30,8 +30,13 @@ fi
# ups.khirnov.net uploader
ups() {
- fname=$(basename "$1")
- url=$(curl -sS -E ~/.local/var/up/cert --data-binary "@$1" "https://ups.khirnov.net/${fname}")
+ if [ "$1" ]; then
+ fname=$(basename "$1")
+ else
+ fname="-"
+ fi
+
+ url=$(curl -sS -E ~/.local/var/up/cert --data-binary "@${fname}" "https://ups.khirnov.net/${fname}")
[ "${url}" ] && echo "${url}"
}