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() { ...@@ -37,16 +37,23 @@ function on_exit() {
unset pid unset pid
} }
function createList() { function get_run_setup_file() {
local LIST local LIST
local file local line
for file in *.detectorfile; do while IFS=';' read -ra line; do
LIST=(${LIST[*]} "FALSE" ${file}) LIST+=("FALSE" "${line[@]}")
done done < pc.cfg
unset file
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() { function dm_driver() {
...@@ -95,13 +102,7 @@ while [ 1 ]; do ...@@ -95,13 +102,7 @@ while [ 1 ]; do
# Ask for the run setup # Ask for the run setup
rs_file=`zenity --title "Run Setup Selector" \ rs_file=`get_run_setup_file`
--list \
--text "Select one of the following Run Setups:" \
--radiolist \
--column="Selection" \
--column="Run Setup file" \
$(createList ${folder})`
if [ -z "${rs_file}" ]; then if [ -z "${rs_file}" ]; then
zenity --error --text="No Run Setup file selected, aborting" 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