Swift Watch and Run

This is my Swift "run on change" watcher script.

#!/bin/sh
# swiftWatchAndRun
if [ $# -ne 1 ]; then
    echo "Use like this:"
    echo "   $0 filename-to-watch"
    exit 1
fi
if which fswatch >/dev/null; then
    echo "Watching swift file $1"
    while true; do fswatch --one-event $1 >/dev/null && echo "----------------"; echo `date +"%m-%d-%y %I:%M%p"`; echo "----------------" && swift $1; sleep 0.1; done
else
    echo "You might need to run: brew install fswatch"
fi