Skip to content

Remove hardcoded silecs version and installation path from silecs.py

During testing it is error-prone to have the default path inside silecs.py, since tests might be run against an productive installed version unnoticed, instead of running them against a temporary install.

As well it will be a bit tedious to change the version-string inside the script for each productive install.

The script instead should figure out it's own filesystem location, and extract the version and the base-path from that.

I dont know how it can be done in python ... in bash the location can be extracted from the first passed argument like this:

SCRIPT=$(readlink -f "$0")
SCRIPT_DIR=$(dirname "$SCRIPT")