iopsys-feed/iop/scripts/genconfig_wrap.sh
Piotr Kubik e8554bcd03 iop: genconfig_wrap: Deprecate --clean option
* deprecate -c /--clean option
	Clean for gen_config.py does something else than original
* few script improvements
2024-01-31 09:56:48 +01:00

29 lines
700 B
Bash
Executable file

#!/bin/bash
# Function to convert parameters to lowercase
function to_lowercase {
local params=()
for param in "$@"; do
params+=("$(tr '[:upper:]' '[:lower:]' <<< "$param")")
done
echo "${params[@]}"
}
function genconfig {
target_script="./scripts/gen_config.py"
# First convert all to lowercase
args=$(to_lowercase "$@")
# Check if an option is provided
if [[ ${args[0]} == -* ]]; then
# Convert options for target script
if [[ ${args[0]} == "-b" || ${args[0]} == "--boards" ]]; then
args=("--list")
fi
fi
${target_script} ${args[@]}
}
register_command "genconfig" "Generate configuration for board and customer"