equal
deleted
inserted
replaced
|
1 #!/bin/bash |
|
2 # File Managed by Puppet |
|
3 PATH=$PATH:/usr/local/bin |
|
4 |
|
5 if [ ! $2 ] ; then |
|
6 echo "Provide the hostname and the project you want to deploy:" |
|
7 echo "superdeploy web01.example42.com myapp" |
|
8 exit 1 |
|
9 fi |
|
10 |
|
11 filtered=$(echo $* | sed "s/[^a-Z0-9= _.\-]//Ig") |
|
12 |
|
13 randfile="$(mktemp)" |
|
14 |
|
15 trap "rm -f $randfile" SIGINT SIGTERM EXIT |
|
16 |
|
17 myarg=$(echo $filtered | sed -e "s/ / -F /g") |
|
18 |
|
19 mc-puppi deploy -I $1 $2 | tee $randfile |
|
20 grep FAILED $randfile && exit 1 |
|
21 exit 0 |
|
22 |