2024-02-14 07:54:31 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2024-12-22 09:05:32 +01:00
|
|
|
if [ x"$1" == x"rm" ]
|
|
|
|
then
|
|
|
|
shift
|
|
|
|
for file in $@
|
|
|
|
do
|
|
|
|
ssh sdk@codevoid.de "cd /home/www/htdocs/ptrace/paste/ && rm -v $(basename "$file")" || true
|
|
|
|
done
|
|
|
|
elif [ x"$1" == x"ls" ]
|
|
|
|
then
|
|
|
|
shift
|
|
|
|
ssh sdk@codevoid.de "cd /home/www/htdocs/ptrace/paste/ && ls -1 | xargs -n1 -I{} echo https://ptrace.org/{}"
|
|
|
|
else
|
|
|
|
for file in $@
|
|
|
|
do
|
|
|
|
chmod o+rw,g+r "$file"
|
|
|
|
scp "$file" sdk@codevoid.de:/home/www/htdocs/ptrace/paste/
|
|
|
|
echo "https://ptrace.org/$(basename "$file")" \
|
|
|
|
| sed 's/ /%20/g' \
|
|
|
|
| xclip -f -r
|
|
|
|
echo
|
|
|
|
done
|
|
|
|
fi
|