tinyscripts/shitpost.sh

19 lines
608 B
Bash
Raw Normal View History

2023-10-14 02:35:57 +11:00
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'"
2024-09-23 21:44:11 +10:00
echo "http://rakka.au$sp_targ" | sed 's/ /%20/g' - -
2023-10-14 02:35:57 +11:00
#desu.si, catbox.moe