Fix shell script to work for first time checkout