diff --git a/bin/watch-vagrant-conf b/bin/watch-vagrant-conf index c00830c..72e7530 100755 --- a/bin/watch-vagrant-conf +++ b/bin/watch-vagrant-conf @@ -1,36 +1,38 @@ #!/bin/bash set -e PUPPET_ENV=$(readlink -f $(dirname $0)/..) RSYNC_PARAMS="-a --progress" EXCLUDES=".git .vagrant" EXCLUDES_PARAMS="" ENVIRONMENTS="production staging" for ex in ${EXCLUDES}; do EXCLUDES_PARAMS="${EXCLUDES_PARAMS} --exclude $ex" done function sync_puppet_conf { branch=$1 rsync $RSYNC_PARAMS $EXCLUDES_PARAMS swh-site/data/ /tmp/puppet/environments/${branch}/data rsync $RSYNC_PARAMS $EXCLUDES_PARAMS swh-site/site-modules/ /tmp/puppet/environments/${branch}/site-modules/ rsync $RSYNC_PARAMS $EXCLUDES_PARAMS private/swh-private-data-censored/ /tmp/puppet/environments/${branch}/data/private } # Initial sync sync_puppet_conf while true; do inotifywait -q -r -e modify -e moved_to -e moved_from -e move -e create $EXCLUDES_PARAMS ${PUPPET_ENV} echo Update detected, synchronizing.... sleep .5 for environment in ${ENVIRONMENTS}; do echo "** Syncing ${environment} environmemt" sync_puppet_conf ${environment} done + CMD="vagrant rsync pergamon" + $CMD && echo $CMD && notify-send --expire-time=10000 "$CMD done!" done