I am writing a Bash script that automatically updates a repository containing source code and then compiles it. I have been a bit stuck on the part about how to start the compilation itself, i.e. if I should cat
all the files in the repository and look for the main
(or equivalent) function and then compile that file. Or if I should let the user specify which file in the repository contains the main
function (or possibly a make
file) in the config file. This option requires more work and insight from the user, but I fear that the first option might cause long delays by unnecessary scanning all the files in the repository. What would be the best approach for solving this problem?
3