From 8c70b95b22e1a38fc84c85381cc641eeb3c2b49e Mon Sep 17 00:00:00 2001 From: Zergling_man Date: Sat, 14 Oct 2023 02:35:57 +1100 Subject: [PATCH] add shitpost tool --- shitpost.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 shitpost.sh diff --git a/shitpost.sh b/shitpost.sh new file mode 100755 index 0000000..dad684a --- /dev/null +++ b/shitpost.sh @@ -0,0 +1,18 @@ +sp_porn=""; +sp_path=""; +sp_file=""; +while getopts "np:l" o;do case "${o}" in + n) sp_porn="nsfw/";; + p) sp_path="$OPTARG";; + l) sp_file="/home/wisknort/Flashy/Pics/puush/$(ls -t /home/wisknort/Flashy/Pics/puush | head -1)";; +esac done +shift $((OPTIND-1)) +if [ -z $sp_file ]; then sp_file="$1"; fi +if [ -z $sp_path ]; then sp_path=$(basename "$sp_file"); fi +sp_targ="/static/pics/$sp_porn$sp_path" +scp "$sp_file" jasmine:"/srv/http$sp_targ" +ssh jasmine chown http:http "'/srv/http$sp_targ'" +ssh jasmine chmod 664 "'/srv/http$sp_targ'" +echo "http://rakka.au$sp_targ" + +#desu.si, catbox.moe