Update shell script. Tweaked from Laracasts.