From 527cb8fe29d1384fe579d70db7c155039060d755 Mon Sep 17 00:00:00 2001 From: Rene Hopf Date: Thu, 12 Nov 2026 15:31:20 +0100 Subject: [PATCH] linuxcnc: run a .demo picked last time, too With -l, LAST_CONFIG from ~/.linuxcncrc is reused without pickconfig, but only pickconfig's result was checked for a .demo, so a demo picked last time went to the INI parser: pyvcp_demo1.demo:3: error: Tag 'thisfile' found without prior section definition Check INIFILE for .demo after either path, which also runs a .demo given on the command line. --- scripts/linuxcnc.in | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/linuxcnc.in b/scripts/linuxcnc.in index 49f9ed0eef3..9dc76e9be82 100644 --- a/scripts/linuxcnc.in +++ b/scripts/linuxcnc.in @@ -352,12 +352,13 @@ if [ -z "$INIFILE" ] ; then # nothing specified, get from the user # it returns either a path, or nothing at all INIFILE=$($PICKCONFIG) - # if name is xxxx.demo, then: - # execute xxxx.demo in background and exit - if [ "${INIFILE%%.demo}".demo = "${INIFILE}" ] ; then - "${INIFILE}" & - exit 0 - fi +fi + +# if name is xxxx.demo (picked now, or picked last time and reused with -l), +# then execute xxxx.demo in background and exit +if [ "${INIFILE%%.demo}".demo = "${INIFILE}" ] ; then + "${INIFILE}" & + exit 0 fi if [ -z "$INIFILE" ] ; then