Permalink
Browse files

adding in support for machine groups

  • Loading branch information...
malloc47 committed Jul 30, 2012
1 parent 7749e32 commit ab8918c17f22d2a9dabd6ea9ca97b39c9cdc968a
Showing with 13 additions and 3 deletions.
  1. +8 −2 cmd
  2. +5 −1 sync
10 cmd
@@ -1,8 +1,14 @@
#!/bin/bash
source config
for m in `cat $MACHINES` ; do
if [ -f "$1" ] ; then
MACHINE_LIST=$(cat $1)
shift
else
MACHINE_LIST=$(cat $MACHINES)
fi
for m in $MACHINE_LIST ; do
if [[ "$m" != "`hostname -s`" ]]; then
echo $m:
ssh $m $@
echo ssh $m $@
fi
done
6 sync
@@ -5,7 +5,11 @@ source ./config
FILE_LIST=$(cd $SHARED_DIR ; find . -type f | grep -v \\.$ | cut -b 2-)
if [ $# -gt 0 ]; then
MACHINE_LIST=$1
if [ -f "$1" ] ; then
MACHINE_LIST=$(cat $1)
else
MACHINE_LIST=$@
fi
else
MACHINE_LIST=$(cat $MACHINES)
fi

0 comments on commit ab8918c

Please sign in to comment.