initial commit
This commit is contained in:
commit
d5804e7ba7
34 changed files with 1220 additions and 0 deletions
14
upload.sh
Executable file
14
upload.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "$0 <source> <host/dest>"
|
||||
exit 1
|
||||
fi
|
||||
source="$1"
|
||||
host=$(echo "$2" | cut -d "/" -f 1)
|
||||
dest=/$(echo "$2" | cut -d "/" -f 2-)
|
||||
echo "$source -> $host$dest"
|
||||
ssh "$host" rm -rfv "$dest/"\*
|
||||
scp -r "$source"/* "scp://$host/$dest"
|
||||
ssh "$host" sudo chown -Rv :www-data "$dest"
|
||||
ssh "$host" ls -al "$dest"
|
Loading…
Add table
Add a link
Reference in a new issue