On 10/18/2010 04:46 PM, Bruce Dubbs wrote: > #!/bin/bash > > <Snip> Looks much cleaner than my own. Included only for reference...different ideas while sharing scripts (I use a top level wrapper called lspec, and llog is a timestamp based logging script I slapped together to account for the goofy names used in scrollkeeper from screwing up install-log).
#!/bin/sh # Package Information export version="8.10" export tarball="pcre-${version}.tar.bz2" export dir="pcre-${version}" export md5sum="780867a700e9d4e4b9cb47aa5453e4b2" export download="http://downloads.sourceforge.net/pcre/${tarball}" . /etc/lspec.conf . ${lspec_dir}/.count let count++ if [ "${count}" -lt "10" ]; then lcount="000${count}" elif [ "${count}" -lt "100" ]; then lcount="00${count}" elif [ "${count}" -lt "1000" ]; then lcount="0${count}" fi # I already have package # get_package cat ${lspec_dir}/pcre > ${build_dir}/logs/$lcount-pcre-${version} && { cd "${build_dir}" && sudo /sbin/llog -p && tar -xf "${source_dir}/${tarball}" && # Account for cp -R for install logging for file in `find . -type f` do touch $file done cd "${dir}" && time { echo "########## PREP AND CONFIGURE ##########" && ./configure --prefix=/usr \ --docdir=/usr/share/doc/pcre-${version} \ --enable-utf8 --enable-unicode-properties \ --enable-pcregrep-libz \ --enable-pcregrep-libbz2 && make && # Checking build dir size is negligable BUILD_SIZE="$(du -shb ./ | awk '{print $1}')" && echo "########## BEGINING TESTSUITE ##########" && time { make check || true } && echo "########## BEGINING INSTALL ##########" && sudo make install && sudo mv -v /usr/lib/libpcre.so.* /lib/ && sudo ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so } && sudo /sbin/llog pcre-${version} && echo "count=${count}" > "${lspec_dir}/.count" && INSTALL_SIZE="$( du -shb `sudo awk '{print $1}' /var/log/llog/pcre-${version}.llog | sed /\(M\)/d ` | awk '{print $1}' | paste -sd+ | bc )" && FULL_BUILD_SIZE="$(du -shb ./ | awk '{print $1}')" && cd .. && rm -rf "${build_dir}/${dir}" && echo "" && echo -n "Diskspace required with testsuite is: " && echo -e "$FULL_BUILD_SIZE\n$INSTALL_SIZE" | paste -sd+ | bc && echo -n "Diskspace required without testsuite is: " && echo -e "$BUILD_SIZE\n$INSTALL_SIZE" | paste -sd+ | bc && echo "" } 2>&1 | tee -a ${build_dir}/logs/$lcount-pcre-${version} -- This message has been scanned for viruses and dangerous content, and is believed to be clean. -- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page