On 09/05/2012 02:01 PM, Bruce Dubbs wrote:
> Baho Utot wrote:
>
>> I still think that helping others even if they have failed to follow the
>> book is a worthy goal as it shows where the book my be improved.  Who
>> knows by some not following the book new things are learned?
> I don't have problem with users not following the book.  It's just that
> sometimes an attitude comes across and that makes it more difficult to
> want to help.
>
> We always suggest a manual build for first time users.  Knowing how it
> is supposed to work is really useful before making custom changes.   It
> is 'Your distro, your rules.'
How ever if one has some previous experience in shell scripts the 
scripting build made be less problematic as cut and paste will reduce 
errors.  You can run/modify the script until you get it correct.  
Correcting each error as you go until you arrive at a good build.  This 
is what I did.  Using DESTDIR helps here as you get n number of do overs ;)
One can not assume that if you do it manually that you will do it 
correctly every time.  What if your some what dyslexic? Then the manual 
way is a great problem.

>
> IMO, building twice, the first time by the book without
> customization/scripts, really will save time in the long run.
>
>

I generally agree here but a simple script like this will catch a lot of 
simple errors.  If you do make an error, by examining you script for 
that package you could see very easy where you made the error.

#!/bin/bash
set -o errexit    # exit if error
set -o nounset    # exit if variable not initalized
set +h        # disable hashall
shopt -s -o pipefail
pkgname=<package name>
pkgver=<package version>
srcname="${pkgname}-${pkgver}.tar.gz"
srcdir=${pkgname}-${pkgver}
startdir=$(pwd)

function unpack() {
     tar xf ${srcname}
}

function clean() {
     rm -rf ${srcdir}
}

function build() {
     # cut and paste here from the book
     ./configure --prefix=/tools
     make
     make -j1 install
}

clean;unpack;pushd ${srcdir};build;popd;clean
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to