Reduce code duplication in build scripts

Issue #20 resolved
Anders Logg (Chalmers) created an issue

There seems to be a lot of duplication in the bash scripts, in partciular in fenics.conf. For example multiple functions pull_ffc, pull_fiat etc. This could be a simple for loop over packages to a common pull function.

Comments (5)

  1. Jack Hale

    Agreed, Larry wrote the bash script as an initial prototype, but it's not really up to the job if we're going to make this main way to develop FEniCS.

    I think the original idea of having it all split up was to make it easy to modify quickly, i.e. I want to pull ffc at commit x, modify the line, ready to build.

    A better system would be to allow the specification of commits, branches and git repos in a JSON payload that I can keep in my shared folder on the host and feed in to the build script. Also, I would prefer to have the script written in Python3 rather than bash.

  2. Anders Logg (Chalmers) reporter

    Python is fine but Bash isn't that bad. It forces us to keep the scripts simple. With Python, there's chance we'll hack away and make something that is harder to maintain.

  3. Min RK

    For the simple shell-command scripting that is needed here, I personally prefer bash (or ruby for more complex logic), but I can take a stab at Python if that would be more maintainable based on maintainers' expertise. If it is going to add more complex options, etc. it certainly makes sense to switch away from bash.

  4. Log in to comment