diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-01-05 22:06:42 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-01-05 22:09:44 +0100 |
commit | c64eb30c2fd94785d6e7a7cca096ab0143e16a74 (patch) | |
tree | 78f015b5f2db328620283ac28c2d75d574fa1867 | |
parent | 2e7da2c5d990c095855709d08a0c6e9948f140ee (diff) |
profile: add function wrapping ups.khirnov.net uploader
-rw-r--r-- | dotfiles/profile | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dotfiles/profile b/dotfiles/profile index 3be0749..c218116 100644 --- a/dotfiles/profile +++ b/dotfiles/profile @@ -28,6 +28,13 @@ if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" 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}") + [ "${url}" ] && echo "${url}" +} + # TODO: umask? # source the machine-local configuration |