From 6f4245eb390970a0ef4aba79fbc84e173239874d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 12 Jan 2021 15:26:18 +0100 Subject: bash: split up(s) into their own executables Makes them easier to call from scripts. --- bin/ups | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 bin/ups (limited to 'bin/ups') diff --git a/bin/ups b/bin/ups new file mode 100755 index 0000000..8353f44 --- /dev/null +++ b/bin/ups @@ -0,0 +1,11 @@ +#!/bin/bash +# ups.khirnov.net uploader + +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}" -- cgit v1.2.3