[add] tools:deploy
This commit is contained in:
parent
bcd3e08192
commit
0311711a67
1 changed files with 27 additions and 0 deletions
27
tools/deploy
Executable file
27
tools/deploy
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## functions
|
||||
|
||||
function syntaxerror
|
||||
{
|
||||
echo "SYNTAX: deploy <target-sys> <target-dir>" > /dev/stderr
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
## args
|
||||
|
||||
if [ $# -ge 1 ] ; then target_sys=$1 && shift ; else syntaxerror ; fi
|
||||
if [ $# -ge 1 ] ; then target_dir=$1 && shift ; else syntaxerror ; fi
|
||||
|
||||
|
||||
## exec
|
||||
|
||||
rsync \
|
||||
--rsh=ssh \
|
||||
--recursive \
|
||||
--update \
|
||||
--delete \
|
||||
--exclude="conf.json" \
|
||||
build/ \
|
||||
${target_sys}:${target_dir}
|
Loading…
Add table
Reference in a new issue