usually the condition is located between the keywords if
, so I'm not really sure what to say (your examples are not complete). See again the man page of bash:
if list; then list; [ elif list; then list; ] ... [ else list; ] fi
The if list is executed. If its exit status is zero, the then list is executed. Otherwise, each elif list is executed in turn, and if its exit
status is zero, the corresponding then list is executed and the command completes. Otherwise, the else list is executed, if present. The exit sta‐
tus is the exit status of the last command executed, or zero if no condition tested true.
EXENAME is a variable and I have no idea what is stored in it. Probably that is an executable. All the other things will be handled/evaluated by that program (and again, > means redirection).