-
Notifications
You must be signed in to change notification settings - Fork 122
Make scripts a bit more safe #745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: Cog
Are you sure you want to change the base?
Conversation
|
Would you be willing to edit all the Linux mvm scripts under building? |
|
There, I think I fixed all of the mvm scripts, there are A LOT of them. I had to script it since there are so many (over 100 I think) I think there were some bugs that I fixed and everything is a bit safer now. On a side note, I don't think having so many scripts that are mostly the same makes any sense, any change is a massive task for little gain. |
|
Hi @ludat, Agreed. If you look in the Windows and Mac builds you'll see the scripts are strict duplicates (which saves adding a directory to a path but is also dubious). The real problem on lunar us the generated Makefiles which are Others have expressed interest in replacing the Unix/linux platforms/unix/config crap/mess/whatever with static Makefiles similar to the macOS and windows ones. I would love to see this. I also don't object to e.g. having a script directory that one must add to one's path to e.g. find common scripts in a single place, e.g. building//bin. If you have energy here do not hesitate. I will help by answering any and all questions you have. It's high time we got rid of the awful mess that is the unix/linux build system. Autoconf is fine for generating a config.h which specifies what facilities are available on the platform. But platforms/unix/config/mkmf is awful and a two-stage build process to modify Makefiles painful. |
|
I'm sorry but I've already spent more time than I'd like on this (at least for free) so this is as far as I'll go. |
This will also help Guix users. See Add script to run on Guix |
While trying to run the vm I found some issues with the script and then reading them I updated some more things:
Fixes
Improvements
$()insteadrm -rf $FILEif the file has the path./something/and/more /will remove every file in the system whilerm -rf "$FILE"will fail withrm: cannot remove './something/and/more /': No such file or directoryQuestions
Also there are some script the get downloaded from the current release to
./image/sqcogspur64linuxht/squeakthat also have absolute paths for some binaries but I'm not sure how to modify those.Recomendations
I'd recommend running shellcheck on the files which usually catches most of these mistakes and can be done automatically