#!/bin/sh DOCUMENTATION=$(cat <&1;)" echo "Noticed change: $file" if [ "$file" = "./ CLOSE_WRITE,CLOSE format.sh" ] || [ "$file" = "./ CLOSE_WRITE,CLOSE build.sh" ]; then echo "Fully rebuilding..." ./build.sh --force --directory "$build_dir" else echo "Rebuilding..." ./build.sh --directory "$build_dir" fi if [ "$?" = "0" ]; then echo "Rebuild successful." else echo "Rebuild failed." fi done