release_tmp 319 Bytes
Newer Older
Nico Schottelius's avatar
Nico Schottelius committed
1
#!/bin/sh -e
2

Nico Schottelius's avatar
Nico Schottelius committed
3
file="$1"
Nico Schottelius's avatar
Nico Schottelius committed
4 5
host=staticweb.ungleich.ch
dir=/home/services/www/nico/www.nico.schottelius.org/www/temp
Nico Schottelius's avatar
Nico Schottelius committed
6
url="https://www.nico.schottelius.org/temp"
7 8 9 10 11

[ -z "$file" ] && exit 1

bfile="$(basename "$file")"

Nico Schottelius's avatar
Nico Schottelius committed
12 13
scp "$file" "${host}:${dir}"
ssh "$host" "chmod a+r \"$dir/$bfile\""
14 15

echo "Pre-released ${url}/${bfile}"