Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: Nate_the_great on August 26, 2020, 04:11:12 PM
-
how to use getlocale.sh??
i type sudo getlocale.shand i get the return no such file or directory
how is it not found after I download it?
i had the onboot selection in the apps browser
i am on tiny core 11 32 bit version
-
The getlocale extension is meant to be run once to create the mylocale extension, so it should not be set "onboot".
You could try removing getlocale from onboot, rebooting and then load it normally.
-
I was also having trouble with this today. By default, you are not setup to run shell scripts. You need to install bash.tcz before shell scripts will run.
-
saladin, TCL comes with Busybox, which includes the ash shell. As such, TCL is certainly setup to run shell scripts (including the getlocale.sh script included in the getlocale extension) by default.
The bash extension is only required for running scripts that contain portability-busting "bashisms".
-
Ok, I guess I just don't know how to run a shell script without bash. I kept getting that same error that the script could not be found, when I specified the entire path to it, or I moved to the containing directory.
-
What's the very first line in the script that's giving you problems? It should look something like this: #!/foo/bar
-
tce-load -wi getlocale.tcz
tce-load -wi glibc_add_lib.tcz
sudo getlocale.sh
-
Hi NONE
tce-load -wi getlocale.tcz
----- Snip -----
That will add getlocale.tcz to the onboot.lst file.
Juanito said:
The getlocale extension is meant to be run once to create the mylocale extension, so it should not be set "onboot". ...
If you add an l to the options it won't be added to onboot.lst file:
tce-load -wil getlocale.tcz
-
What's the very first line in the script that's giving you problems? It should look something like this: #!/foo/bar
Yup. I'm an idiot. #!bin/bash. If I change bash to ash, it will work? It's all commands that work without bash. No fancy loops or anything.
-
Hi saladin
It should be:
#!/bin/shThe /bin/sh link points to busybox ash.
Yup. I'm an idiot. #!bin/bash. ...
That's a typo, right? You actually had #!/bin/bash , right?
-
Yes, that was a typo. I did have the script running once I installed bash. :P
Thanks for the tip. I'll fix my script and not install bash in the future.
-
Hi, saladin. I'm glad you sorted it out. If you avoid bashisms in your scripts, #!/bin/sh should work on pretty much any Unix-like OS (e.g., any linux or BSD version).
Happy hacking!
-
So, besides arrays (which you can kludge around like I did here http://forum.tinycorelinux.net/index.php/topic,21017.msg131770.html#msg131770 (http://forum.tinycorelinux.net/index.php/topic,21017.msg131770.html#msg131770), which are the most common bashisms that are causing problems with /busybox/ash? More to the point, which don't have simple fixes like syntax? Even ash has some extensions to POSIX.
-
Hi, andyj. Greg's wiki has the most helpful discussion of bashisms I've seen:
https://mywiki.wooledge.org/Bashism
P.S. For most intents and purposes, dash and Busybox ash are identical.