~andrewjbeach/juju-ci-tools/make-local-patcher

« back to all changes in this revision

Viewing changes to run-maas-networking.bash

Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
# This script presumes ~/ci and ~/.juju is setup on the remote machine.
3
 
set -eu
4
 
SCRIPTS=$(readlink -f $(dirname $0))
5
 
 
6
 
usage() {
7
 
    echo "usage: $0 user@host tarball"
8
 
    echo "  user@host: The user and host to ssh to."
9
 
    exit 1
10
 
}
11
 
 
12
 
test $# -eq 2 || usage
13
 
USER_AT_HOST="$1"
14
 
TARFILE="$2"
15
 
 
16
 
set -x
17
 
 
18
 
cat > temp-config.yaml <<EOT
19
 
install:
20
 
  remote:
21
 
    - $SCRIPTS/run-maas-networking-remote.bash
22
 
    - "$TARFILE"
23
 
command: [remote/run-maas-networking-remote.bash, "remote/$(basename $TARFILE)"]
24
 
EOT
25
 
~/workspace-runner/workspace-run temp-config.yaml $USER_AT_HOST