#!/bin/bash PREFIX=/opt/X11R7.5 XORG=$PWD usage() { scriptname=`basename $0` echo << USAGE $0 [--restart] [] $scriptname is a script to build all X.Org modules into the" specified prefix (default: $PREFIX). If started without options, scriptname continues from the last" built-modules. The list of already build modules is stored" in $XORG/built.modules. $scriptname must be run from the base of the supermodule. Options: --restart ... wipes the prefix before starting. USAGE } while test $# != 0; do case $1 in --restart) WIPE=1 ;; -*) usage $0 exit ;; *) PREFIX="$1" ;; esac shift done if ! test -d $XORG; then mkdir -p $XORG fi # First run? Init submodule and symlink extras for build.sh for file in extras/*; do if ! test -e ${file/extras\/}; then ln -s $file fi done if ! test -d $XORG/util/modular; then git clone git://anongit.freedesktop.org/git/xorg/util/modular $XORG/util/modular fi if ! test -e $XORG/built.modules; then WIPE=1 fi if test -z "$WIPE"; then CONTCMD="-r `tail -n 1 $XORG/built.modules`" else echo -n "Wiping $PREFIX... (5 seconds to cancel)" sleep 5 rm -rf "$PREFIX/*" if test -e $XORG/built.modules; then rm $XORG/built.modules fi echo "... done" fi git config --global user.email > /dev/null if test $? -ne 0; then git config --global user.email "tinderbox@tinder.box" git config --global user.name "Tinderbox user" fi export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig export ACLOCAL="aclocal -I $PREFIX/share/aclocal" export LD_LIBRARY_PATH=$PREFIX/lib echo "Updating util/modular" cd $XORG/util/modular && git pull --rebase origin || exit 1 echo "**************** TINDERBOX BUILD STARTING *****************" cd $XORG && $XORG/util/modular/build.sh $CONTCMD -f $XORG/built.modules $PREFIX