diff options
-rw-r--r-- | bash/bashrc | 24 | ||||
-rw-r--r-- | dotfiles/profile | 24 |
2 files changed, 24 insertions, 24 deletions
diff --git a/bash/bashrc b/bash/bashrc index 18364ac..3c71d56 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -53,6 +53,30 @@ cu() cd "${dir}" } +# ups.khirnov.net uploader +ups() { + 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}" +} + +# 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}" +} + # define the prompt . ~/.config/bash/prompt PS1=$(__prompt_func) diff --git a/dotfiles/profile b/dotfiles/profile index 17b169e..3be0749 100644 --- a/dotfiles/profile +++ b/dotfiles/profile @@ -28,30 +28,6 @@ if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi -# ups.khirnov.net uploader -ups() { - 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}" -} - -# 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 |