On 05/15/2013 03:56 PM, Bruce Dubbs wrote:
> William Harrington wrote:
>> On May 15, 2013, at 12:12 PM, Bruce Dubbs wrote:
>>
>>> Not quite.  I just put that out as an example of fetching via
>>> svn/ftp/http and some examples of using regex expressions.
>>>
>>> The changes are not great, but the edited diff below shows the relevant
>>> changes.  Mostly regex additions/changes.
>> Excellent. Thanks for the info. I'm planning on adding checks for my
>> current server build for packages I have installed. The script will give
>> me a great base to start from.
>>
>> I decided to increase my apache/php/mysql knowledge and created
>> databases for LFS or CLFS builds and I have the package name, version,
>> configure options, and notes (I use for the installation instructions as
>> well).  I have it to where I can edit add or delete entries.  As I
>> update versions I update the configure and notes if required.
>>
>> So each build I have a database and build order using mysql.  A bit
>> overkill, but it is a good project!
> Yes, I 'd say it was a bit of overkill, but if it gives you some DB
> experience then it's good.
>
> You might want to like into https://mariadb.org/.  mysql is being
> impacted by Oracle in some not-helpful ways.
>
> Personally, I have some simple bash scripts that log each package as
> it's built in a simple file.  E.g:
>
> $ head packages-SVN-20121218.log
> Tue Dec 18 21:28:30 GMT 2012 /usr/src/bc/bc-1.06.95.tar.bz2
> Tue Dec 18 21:30:01 GMT 2012 /usr/src/lsb-release/lsb-release-1.4.tar.gz
> Tue Dec 18 21:41:49 GMT 2012 /usr/src/sudo/sudo-1.8.6p3.tar.gz
> Tue Dec 18 21:46:39 GMT 2012 /usr/src/openssl/openssl-1.0.1c.tar.gz
> Tue Dec 18 21:48:28 GMT 2012 /usr/src/openssh/openssh-6.1p1.tar.gz
> Wed Dec 19 00:09:11 GMT 2012 /usr/src/alsa/alsa-lib/alsa-lib-1.0.26.tar.bz2
> Wed Dec 19 00:16:23 GMT 2012
> /usr/src/alsa/alsa-utils/alsa-utils-1.0.26.tar.bz2
> Wed Dec 19 00:49:10 GMT 2012 /usr/src/cdparanoia/cdparanoia-III-10.2.src.tgz
> Wed Dec 19 04:08:34 GMT 2012 /usr/src/which/which-2.20.tar.gz
> Wed Dec 19 04:26:50 GMT 2012 /usr/src/yasm/yasm-1.2.0.tar.gz
>
> All my sources are in /usr/src and I just create a new Makefile for each
> revision for example I have:
>
> bc-1.06.log
> bc-1.06.95.log
> bc-1.06.95.tar.bz2
> bc-1.06.log
> bc-1.06.tar.gz
> make-bc-1.06
> make-bc-1.06.95
>
> If I want to build a new version, I copy make-bc-1.06.95 make-bc-1.xx.xx
> and edit the contents, most of which is boilerplate.  Usually only a few
> commands or a version need to be updated:
>
> $ cat make-bc-1.06.95
> #!/bin/bash
>
> source /usr/src/stats
>
> #######################
> # Installing bc
>
> DIR=`pwd`
> PROGRAM=bc-1.06.95
> LOG="$DIR/$PROGRAM.log"
> TITLE="$PROGRAM"
> TIMEFORMAT="$TIMEFMT $TITLE"
>
> BUILDDIR=/tmp/bc
>
> rm -f  $LOG
> rm -rf $BUILDDIR
> mkdir  $BUILDDIR
> cd     $BUILDDIR
>
> before=`df -k /tmp | grep / | sed -e "s/ \{2,\}/ /g" | cut -d' ' -f3`
>
> tar -xf $DIR/$PROGRAM.tar.?z* || exit 1
>
> cd $PROGRAM
> { time \
>     {
>       echo Making $TITLE
>       date
>
>       ./configure --prefix=/usr --with-readline           &&
>       make                                                &&
>       #echo "quit" | ./bc/bc -l Test/checklib.b            &&
>       $SUDO make install
>     }
> } 2>&1 | tee -a $LOG
You can change

} 2>&1 | tee -a $LOG

to

} |& tee -a $LOG


the |& does the same thing as 2>&1

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to