Skip to content
Snippets Groups Projects
Commit 7fe949f4 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana
Browse files

sw: Changed rename phase in PTS software build

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.
parent 73be1c35
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment