20 lines
560 B
Bash
Raw Normal View History

2024-03-25 10:20:47 +01:00
preset() {
# not yet working
# FIXME properties file not correctly read
# FIXME how do we set multiple values in a simple properties file
# TODO think about a better mechanism
utilIsReadPropertiesFile ./.dev-presets presetOptions presetValues
printf "presetOptions %s\n" "${presetOptions[@]}"
printf "presetValues %s\n" "${presetValues[@]}"
echo 'Please enter your choice: '
local index=0
for item in "${presetOptions[@]}"
do
echo ${index}. ${item}
index="$((index + 1))"
done
read n
echo "opt: $n"
echo "presetValue: ${presetValues[$n]}"
}