mkiraf without entering terminal type
epud wrote on Nov 02, 2010
Hi.
I am making a csh install script where I issue the command:
mkiraf
I would however prefer it if it just picked xgterm instead of prompting the user to type it in. Is there a way I can call mkiraf so that no user input is required?
Thanks,
Paul
I am making a csh install script where I issue the command:
mkiraf
I would however prefer it if it just picked xgterm instead of prompting the user to type it in. Is there a way I can call mkiraf so that no user input is required?
Thanks,
Paul
Mike Fitzpatrick wrote on Nov 02, 2010
The current MKIRAF command expects to read input from stdin in response to prompts. You can deal with this in a C-shell script by providing the input by redirection, e.g.
Note that if you have an existing uparm dir you'll be prompted whether to initialize it and so the first case takes care of that, otherwise only the terminal type will be set.
This seemed a reasonable thing to do so for v2.15 I've added args to the MKIRAF script to do this automatically, e.g.
where the '-t <term>" sets the terminal type, "-i" will initialize a uparm dir, and '-q' will suppress any output.
if (-e uparm) then
mkiraf << EOF_MIRAF1 >& /dev/null
y
xgterm
EOF_MKIRAF1
else
mkiraf << EOF_MKIRAF2 >& /dev/null
xgterm
EOF_MKIRAF2
endif
Note that if you have an existing uparm dir you'll be prompted whether to initialize it and so the first case takes care of that, otherwise only the terminal type will be set.
This seemed a reasonable thing to do so for v2.15 I've added args to the MKIRAF script to do this automatically, e.g.
mkiraf -t xgterm -i -q
where the '-t <term>" sets the terminal type, "-i" will initialize a uparm dir, and '-q' will suppress any output.
Last post on Nov 02, 2010