2023-10-12 00:16:51 +02:00
|
|
|
#!/bin/bash
|
2021-12-21 20:14:02 +01:00
|
|
|
# Wrapper script around auto-cpufreq using the python virtual environment
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
# bailout function
|
2024-06-07 18:47:01 +02:00
|
|
|
err_exit() {
|
|
|
|
echo "$(basename $0): ${1:-wrong invocation. try --help for help.}" 1>&2
|
|
|
|
exit 1
|
2021-12-21 20:14:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
# load python virtual environment
|
2024-06-07 18:47:01 +02:00
|
|
|
opt_path=/opt/auto-cpufreq
|
|
|
|
venv_bin_dir=$opt_path/venv/bin
|
|
|
|
. "$venv_bin_dir/activate"
|
2021-12-21 20:14:02 +01:00
|
|
|
|
2024-06-07 18:47:01 +02:00
|
|
|
PYTHONPATH=$opt_path $venv_bin_dir/python $venv_bin_dir/auto-cpufreq "$@"
|