2020-04-02 08:38:36 +00:00
|
|
|
#!/bin/zsh
|
2020-08-11 10:09:05 +00:00
|
|
|
#dep:ssh rsync
|
2020-04-02 08:38:36 +00:00
|
|
|
file_id=$(head -c 12 /dev/urandom|base64| tr '/' '+')
|
|
|
|
file_name=${2:-${1:t}}
|
|
|
|
|
|
|
|
ssh qwerty mkdir -p ~/share/$file_id/
|
|
|
|
rsync -P $1 qwerty:share/$file_id/$file_name
|
|
|
|
ssh qwerty ~/update-www-perms.sh
|
|
|
|
echo https://share.qwertyuiop.de/$file_id/$file_name
|