Last active
May 5, 2016 02:04
-
-
Save EnriqueV/c6f018fbb20aff624de0f4584802ae55 to your computer and use it in GitHub Desktop.
watch gulp task
This file contains 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 | |
while true | |
do | |
cwd=$(pwd) | |
FILES=$cwd/src/**/**/* // renplace with your path | |
current=`date +%s` | |
for f in $FILES | |
do | |
last_modified=`stat -c %Y $f` | |
if [ $(($current-$last_modified)) -lt 2 ]; then | |
gulp build-custom // your cgulp command | |
break; | |
fi | |
done | |
sleep 1s | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment