| 12345678910111213141516171819202122232425262728 | #!/usr/bin/env bashWORK_DIR=$1if [ ! -n "${WORK_DIR}" ] ;then    WORK_DIR="."fiecho "Restarting LaravelS..."./bin/laravels restart -d -iecho "Starting inotifywait..."LOCKING=0inotifywait --event modify --event create --event move --event delete -mrq   ${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
 |