| 1234567891011121314151617181920212223242526 | #!/usr/bin/env bashWORK_DIR=$1if [ ! -n "${WORK_DIR}" ] ;then    WORK_DIR="."fiecho "Restarting LaravelS..."./bin/laravels restart -d -iecho "Starting fswatch..."LOCKING=0fswatch -e ".*" -i "\\.php$" -r ${WORK_DIR} | while read filedo    if [[ ! ${file} =~ .php$ ]] ;then        continue    fi    if [ ${LOCKING} -eq 1 ] ;then        echo "Reloading, skipped."        continue    fi    echo "File ${file} has been modified."    LOCKING=1    ./bin/laravels reload    LOCKING=0doneexit 0
 |