Initial commit
This commit is contained in:
commit
3393073cd3
9 changed files with 122 additions and 0 deletions
14
bin/share
Executable file
14
bin/share
Executable 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}"
|
Loading…
Add table
Add a link
Reference in a new issue