LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   samples of LFS build scripts (https://www.linuxquestions.org/questions/linux-from-scratch-13/samples-of-lfs-build-scripts-344003/)

dimaash 07-17-2005 11:54 AM

samples of LFS build scripts
 
Hi everyone!

I am pretty sure that i am not the first one who thought about it, but anyway. Let's say, i am somewhere near the middle of LFS building process and by accident i destroyed newly created toolchain or temporary environment or something in that nature. Since i do not have required expereience to "fix" the problem i think it would be wiser to restart all over again. But as I go further in the building process, there are more and more commands to type. So, wouldn't it be easier to put them in some kinda of bash script and let it run up to the point where i "screwed up" ? If it does make sense, can anyone show me examples of their LFS build scripts? I do not have very good knowledge of bash scripting, but i think if i have some sample to look at, then i can handle it.

Thanks, appriciate in advance.

zonk 07-17-2005 12:02 PM

in the easiest version, simply type out all the commands you need in a text file, one command per line. make sure to use absolute paths instead of relative paths. copy&paste from the manual to make sure you don't get typos in there. then put

#!/bin/bash

as the first line of the script and change the permissions like this:

chmod +x file_name

to make it executable. then, when you run ./file_name it will execute all the lines in the file one by one. simplest version of scripting. if you look up bash faqs and tutorials you can find out how to test for things and use variables and stuff and make it much more fancy.

madluther 07-17-2005 12:09 PM

There is a whole subproject of LFS called ALFS which stands for Automated LFS, it can build the complete system, or selectively build bits and pieces from an ncurses style menu. See http://www.linuxfromscratch.org/alfs/ for more info.

Pestossimo 07-20-2005 09:35 PM

Quote:

Originally posted by madluther
There is a whole subproject of LFS called ALFS which stands for Automated LFS, it can build the complete system, or selectively build bits and pieces from an ncurses style menu. See http://www.linuxfromscratch.org/alfs/ for more info.
Um, sounds a lot like Gentoo.


All times are GMT -5. The time now is 06:04 AM.