diff options
-rwxr-xr-x | bootstrap.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..50e8673 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e +set -x +EXEC_BIN="$(basename $1)" +scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$1" "root@$(cat $WORKSPACE/hosts):$EXEC_BIN" +if [ -z $2 ]; +then + ssh -t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "root@$(cat $WORKSPACE/hosts)" "./$EXEC_BIN" +else + ssh -t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "root@$(cat $WORKSPACE/hosts)" "$2" "./$EXEC_BIN" +fi |