summaryrefslogtreecommitdiff
path: root/dotfiles/profile
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-01-06 20:29:22 +0100
committerAnton Khirnov <anton@khirnov.net>2021-01-06 20:29:22 +0100
commitba9d7d3b2cd9e04535bf8d78524b1afc003581c3 (patch)
treeb527780d14590f95579cf327ff1021f2fc89edbd /dotfiles/profile
parent9b8354ebe8423c6fb4a61e7677f384dcdc75d888 (diff)
profile: add wrapper function for 0x0 instance at up.khirnov.net
Diffstat (limited to 'dotfiles/profile')
-rw-r--r--dotfiles/profile12
1 files changed, 12 insertions, 0 deletions
diff --git a/dotfiles/profile b/dotfiles/profile
index 749f360..17b169e 100644
--- a/dotfiles/profile
+++ b/dotfiles/profile
@@ -40,6 +40,18 @@ ups() {
[ "${url}" ] && echo "${url}"
}
+# up.khirnov.net 0x0 instance
+up() {
+ if [ "$1" ]; then
+ fname=$(basename "$1")
+ else
+ fname="-"
+ fi
+
+ url=$(curl -sS -E ~/.local/var/up/cert -F "file=@${fname}" "https://up.khirnov.net/")
+ [ "${url}" ] && echo "${url}"
+}
+
# TODO: umask?
# source the machine-local configuration