Created
August 11, 2015 23:19
-
-
Save wu-lee/5a9ba0d1fef4fd636497 to your computer and use it in GitHub Desktop.
An inotifywait driven script to run erica push in a couchdb development directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
root=$(dirname $(readlink -f $0)) | |
app=$(basename $root) | |
src="$root/render" | |
couchdb=${couchdb:-http://${couchdb_auth:+$couchdb_auth@}localhost:5984/$app} | |
while true; do | |
echo "pushing $src to $couchdb id $app" | |
erica push $src $couchdb | |
inotifywait -r $src -e create -e modify -e delete -e move --exclude '/[.]#|~$|#$' || break | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment