From: Emil Williams Date: Sun, 10 Aug 2025 20:05:28 +0000 (+0000) Subject: chud_upload.sh X-Git-Url: https://git.xolatile.top/?a=commitdiff_plain;h=16f3d7d977ace7d3c947329cdd96cdac9259e707;p=emil-xolatile.top.git chud_upload.sh --- diff --git a/files/chud_upload.sh b/files/chud_upload.sh new file mode 100644 index 0000000..6c49c56 --- /dev/null +++ b/files/chud_upload.sh @@ -0,0 +1,12 @@ +# . /path/o/chud_upload.sh +# or inline in rc +upload(){ +url="$1" +shift +if [ -z "$@" ] ; then curl "$url" -F"file=@/dev/stdin"; fi +for i in "$@"; do +if [ "$i" = "-" ]; then i="/dev/stdin" ; fi +curl "$url" -F"file=@$i" +done +} +chud(){ upload "https://up.chud.cyou" "$@" ; }