Browse Source

Enhanced update.sh to push to yoda, and cleaned

testing
Alejandro Mery 17 years ago
parent
commit
31ef109523
1 changed files with 9 additions and 4 deletions
  1. +9
    -4
      update.sh

+ 9
- 4
update.sh

@ -6,7 +6,6 @@ for x in root/*/Makefile; do
make -C ${x%/*}
done
RSYNCOPT="-avP"
RSYNCOPT="$RSYNCOPT --exclude */*.zone.in"
RSYNCOPT="$RSYNCOPT --exclude .gitignore"
RSYNCOPT="$RSYNCOPT --exclude Makefile"
@ -15,10 +14,16 @@ RSYNCOPT="$RSYNCOPT --delete --delete-after --delete-excluded"
(
cat <<-EOT
root@yoda.geeks.cl 2203 /etc/opt/djbdns/tinydns/root
root@atlien.geeks.cl 22 /etc/opt/djbdns/tinydns/root
root@socomep.geeks.cl 2203 /etc/opt/djbdns/tinydns/root
root@koke.socomep.cl 2203 /etc/opt/djbdns/tinydns/root
EOT
) | while read REMOTE PORT DIR; do
echo "=== $REMOTE:$PORT ($DIR) ==="
( rsync --rsh "ssh -p $PORT" $RSYNCOPT $DIRS "$REMOTE:$DIR" && ssh -p $PORT $REMOTE make -C "$DIR" data.cdb ) < /dev/null
(
export RSYNC_RSH="ssh -p $PORT"
echo "=== $REMOTE:$PORT ($DIR) ==="
rsync -a root/Makefile "$REMOTE:$DIR" &&
rsync -a $RSYNCOPT $DIRS "$REMOTE:$DIR" &&
ssh -p $PORT $REMOTE make -C "$DIR" data.cdb
) < /dev/null
done

Loading…
Cancel
Save