mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
iop: genconfig_wrap: Move script to main repo
This commit is contained in:
parent
cbfc98d85e
commit
dd0dec6ac4
1 changed files with 0 additions and 29 deletions
|
|
@ -1,29 +0,0 @@
|
|||
#!/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"
|
||||
Loading…
Add table
Reference in a new issue