Skip to content
Snippets Groups Projects
Commit 7a0b92c5 authored by Carmelo Pellegrino's avatar Carmelo Pellegrino
Browse files

run setups list read from file

parent 642cc736
No related branches found
No related tags found
No related merge requests found
......@@ -37,16 +37,23 @@ function on_exit() {
unset pid
}
function createList() {
function get_run_setup_file() {
local LIST
local file
local line
for file in *.detectorfile; do
LIST=(${LIST[*]} "FALSE" ${file})
done
unset file
while IFS=';' read -ra line; do
LIST+=("FALSE" "${line[@]}")
done < pc.cfg
echo ${LIST[*]}
echo $(zenity --title "Run Setup Selector" \
--list \
--text "Select one of the following Run Setups:" \
--radiolist \
--column="Selection" \
--column="Run Setup file" \
--column="Run Setup name" \
--column="Description" \
--hide-column=2 "${LIST[@]}")
}
function dm_driver() {
......@@ -95,13 +102,7 @@ while [ 1 ]; do
# Ask for the run setup
rs_file=`zenity --title "Run Setup Selector" \
--list \
--text "Select one of the following Run Setups:" \
--radiolist \
--column="Selection" \
--column="Run Setup file" \
$(createList ${folder})`
rs_file=`get_run_setup_file`
if [ -z "${rs_file}" ]; then
zenity --error --text="No Run Setup file selected, aborting"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment