Initial commit

This commit is contained in:
Tim Schubert 2021-01-24 19:00:03 +01:00
commit 3393073cd3
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA
9 changed files with 122 additions and 0 deletions

14
bin/share Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh
set -u
set -e
name=$(basename $1)
user="dadada"
host="share.dadada.li"
w3dir="share"
pubname="$(sha256sum $1 | cut -d " " -f 1)"
ssh ${user}@${host} "mkdir -p ${w3dir}/${pubname}" > /dev/null
scp $1 ${user}@${host}:${w3dir}/${pubname}/${name} > /dev/null
echo "https://${host}/${pubname}/${name}"