File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 1313
1414ALL_ARGS=(" $@ " )
1515DUMP_MODEL=0
16+ USE_GDB=0
1617
18+ PARSED_ARGS=()
1719while [[ " $# " -gt 0 ]]; do
1820 case $1 in
21+ --gdb)
22+ USE_GDB=1
23+ shift
24+ ;;
1925 --dump-edm* )
2026 DUMP_MODEL=1
21- break
27+ PARSED_ARGS+=(" $1 " )
28+ shift
2229 ;;
2330 * )
31+ PARSED_ARGS+=(" $1 " )
2432 shift
2533 ;;
2634 esac
2735done
2836
37+ ALL_ARGS=(" ${PARSED_ARGS[@]} " )
38+
2939if [ ${DUMP_MODEL} = 1 ]; then
40+ if [ ${USE_GDB} = 1 ]; then
41+ echo " --gdb cannot be used together with --dump-edm" >&2
42+ exit 1
43+ fi
3044 if ! ls " ${THIS_DIR} " /json-to-yaml > /dev/null 2>&1 ; then
3145 echo " Could not find the json-to-yaml executable (has it been instaled?)" >&2
3246 exit 1
3347 fi
3448 " ${THIS_DIR} " /podio-dump-tool " ${ALL_ARGS[@]} " | " ${THIS_DIR} " /json-to-yaml
3549else
36- " ${THIS_DIR} " /podio-dump-tool " ${ALL_ARGS[@]} "
50+ if [ ${USE_GDB} = 1 ]; then
51+ gdb --args " ${THIS_DIR} " /podio-dump-tool " ${ALL_ARGS[@]} "
52+ else
53+ " ${THIS_DIR} " /podio-dump-tool " ${ALL_ARGS[@]} "
54+ fi
3755fi
You can’t perform that action at this time.
0 commit comments