dringuet at gmail.com
Fri Feb 19 15:28:07 PST 2010
On Fri, Feb 19, 2010 at 8:48 AM, Andrew Benton <b3nton at gmail.com> wrote:
Hello world exit status:
Sorry if my solution sounds awful, it doesn't include the use of git, only
First, I use a makefile which creates my bash scripts from xml then this
bash script is copied to ".orig". Otherwordly, it ends up with 3 files eg:
LFS/chapter06/bash.xml, .../bash.sh and .../bash.orig. Note: If bash.patch
is present, then bash.sh is patched accordingly.
Second, vim is embeded within a simple script. So if I type "./pkman -e
bash" (it takes chapter 6 as default, unless I specify "./pkman -e
chapter05/bash"), then it vims LFS/chapter06/bash.sh and upon exit it
produces a diff comparing bash.orig and the recently modified bash.sh, thus
adding bash.patch to the lot.
Third, let's specify that the way I wanted the things done, a single
configuration file is required as user's input. The beauty for the lazy man
here is that you edit this file to set hostname, ip and the likes. Then you
start compilation without interventions until the passwords of root and the
default user (set within this config file) are asked at the end of the
build. Also whenever the tag <replaceable> is met when converting xml to
bash, it is replaced with something like:
variable name, if not existing within the config file is then appended to
it, prompting me to enter the value for future reference. Now, I'm reaching,
let's get back to main topic.
Before starting, I move whatever is found within ./sources/ to
./sources.old/ then when a file is required, it is moved from ./sources.old/
to ./sources/ else if the file is not found, it procedes with wget. This is
my way to repel the bloat. When moving to a new host, I simply edit my
config file and move over my ./sources/ directory. I used to simply delete
sources.old at the end of the build, but now it is kept around for some
spooky situations. Still you could always:
# For convenience since my bash is far better than my english.
SIZE=`du -s ./sources.old/|cut -f 1`
if [ "$SIZE" -gt "$MAXS" ]; then rm -fr ./sources.old/*; fi
# I don't know if it's readable, let's hope that helps somehow.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the blfs-support