Xcode Build Script (Build Phases->Run Script) Increment Build Version based on Username(User)
You can see the script log in the Log Navigator, with your script i've got the following issue:
I believe the default comparison is case sensitive, to make it not sensitive you can change the username to uppercase/lowercase before comparison:
if [ `echo $USER | tr [:lower:] [:upper:]` = "USERNAME" ]; thenecho "Got user check"fi
As you can see I moved $USER to the condition to avoid additional var usage and the script failure.
And the semicolon at if-then
block is a normal thing, check the man page. then
word might be moved to the new line if that is more convenient for you to read.