Created
November 27, 2016 10:28
-
-
Save greymd/f142b9a94c5d0ce6c4cd1f8d490849a7 to your computer and use it in GitHub Desktop.
gradle trigger
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 -xv | |
# Dependencies | |
# * fswatch | |
# $ brew install fswatch | |
THIS_DIR=$(cd $(dirname $0) && pwd) | |
SEMAPHORE="/tmp/automake.$$" | |
while ps $$ > /dev/null ; do | |
sleep 1 | |
[ -e "$SEMAPHORE" ] || continue | |
rm -f "$SEMAPHORE" | |
$THIS_DIR/gradlew build | |
done & | |
fswatch --event=Updated $THIS_DIR/src/ | while read $line; | |
do | |
touch "$SEMAPHORE" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment