Tiny Core Linux
Tiny Core Base => TCB Bugs => Topic started by: uggla on May 01, 2012, 03:27:41 PM
-
The present ondemand scripts that tc creates removes quotes around user typed command line parameters.
#!/bin/sh
SAVE_ARGS=$*
TCEDIR=/etc/sysconfig/tcedir
if [ ! -e /usr/local/tce.installed/app ]; then
tce-load -is $TCEDIR/optional/app.tcz
fi
[ $(which app) ] && exec app ${SAVE_ARGS}
Because of that this command doesn't work:
ondemandapp "/home/tc/dir with spaces/file"
The ondemand script should instead look like this:
#!/bin/sh
for arg do
case ${arg:0:1} in
-) SAVE_ARGS="${SAVE_ARGS} ${arg}";;
/) SAVE_ARGS="${SAVE_ARGS} \"${arg}\"";;
*) SAVE_ARGS="${SAVE_ARGS} \"$PWD/${arg}\"";;
esac
done
TCEDIR=/etc/sysconfig/tcedir
if [ ! -e /usr/local/tce.installed/app ]; then
tce-load -is $TCEDIR/optional/app.tcz
fi
[ $(which app) ] && exec app ${SAVE_ARGS}
-
Sorry, this one actually works:
#!/bin/sh
TCEDIR=/etc/sysconfig/tcedir
if [ ! -e /usr/local/tce.installed/app ]; then
tce-load -is $TCEDIR/optional/app.tcz
fi
[ $(which app) ] && exec app "$@"
-
I still cringe when I see spaces in filenames. I mean three extra keystrokes and even to have to hold down the Shift key! For what, I say. Either your a very fast typist or a masochist. Still cringing!
It will be incorporated. Actually I plan to streamline ondemand in 4.6, I hope you will be willing to test your "spaces" during the release candidate cycle and not wait until a day one event as many did with 4.5
-
unix = worn nubbins of names
-
Yeah, but today, with all the "texting" you would think quotes and spaces are even less used. And likely many words I would not even understand.
-
@uggla. Seems tce-run will also benefit.
-
Sounds great! I promise to test ;)