Can I determine commandline last BuildTarget used?

I’d like to find out for use in a shell script if a project has been built with android or ios. How do I accomplish that without starting unity?

It is probably in the log file

I think it might be stored in ./Library/EditorUserBuildSettings.asset, but that is a binary file.