• Theodor-Adrian Stana's avatar
    sw: Changed rename phase in PTS software build · 7fe949f4
    Theodor-Adrian Stana authored
    The rename phase (which was previously sed-based) has now been changed to change
    the ELMA IP/hostname in the men-on, men-off and get-fan-speeds scripts.
    Previously, I had omitted these three scripts and the IP and hostname were
    hard-coded.
    
    This has now been changed by environment variables, which "incidentally" have
    the same way of definition in shell script as template strings under Python.
    Therefore, this nice similarity between Python and shell script was used to
    create a Python script that does the renaming where needed.
    
    The renaming is done as follows:
    - ptsdefine.py, via three template strings that are replaced by the `rename'
      script
    - men-on/men-off/get-fan-speeds, via three template strings that double as
      environment variables; this doubling can be used in the future, should it be
      needed
    
    When you run `make', the `rename' script is called with the necessary params
    by the Makefile (assuming you give the Makefile variables -- otherwise the
    `rename' script fails, telling you why) and it handles the renaming in all the
    places above.
    7fe949f4
Makefile 1.12 KB