00 0 SCRIPT is PACKAGE is FTPDIR is #!/bin/bash set -e SRC_ARCHIVE=$SRC_ARCHIVE FTP_SERVER=$FTP_SERVER PACKAGE= PKG_DIR= SRC_DIR=$SRC_DIR cd $SRC_DIR/$PKG_DIR rm -rf $UNPACKDIR unpacked cd $SRC_DIR/MesaLib UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'` rm -rf $UNPACKDIR unpacked SRC_DIR=$SRC_DIR cd $SRC_DIR mkdir -p xc cd xc exit mkdir -p $SRC_DIR/$PKG_DIR cd $SRC_DIR/$PKG_DIR if [[ -e unpacked ]] ; then UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'` rm -rf $UNPACKDIR fi tar -xvf $PACKAGE > unpacked UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'` cd $UNPACKDIR sudo /sbin/ ldconfig SRC_ARCHIVE=$SRC_ARCHIVE FTP_SERVER=$FTP_SERVER mkdir -p ${section} cd ${section} for line in $(grep -v '^#' ../${sect-ver}.wget) ; do if [[ ! -f $line ]] ; then if [[ -f $SRC_ARCHIVE/Xorg/$section/$line ]] ; then cp $SRC_ARCHIVE/Xorg/$section/$line $line elif [[ -f $SRC_ARCHIVE/Xorg/$line ]] ; then cp $SRC_ARCHIVE/Xorg/$line $line elif [[ -f $SRC_ARCHIVE/$section/$line ]] ; then cp $SRC_ARCHIVE/$section/$line $line elif [[ -f $SRC_ARCHIVE/$line ]] ; then cp $SRC_ARCHIVE/$line $line else wget ${FTP_SERVER}conglomeration/Xorg/$line || \ wget http://xorg.freedesktop.org/releases/individual/util/$line fi fi done md5sum -c ../${sect-ver}.md5 cp ../${sect-ver}.wget ../${sect-ver}.wget.orig cp ../${sect-ver}.md5 ../${sect-ver}.md5.orig for package in $(grep -v '^#' ../${sect-ver}.wget) ; do packagedir=$(echo $package | sed 's/.tar.bz2//') tar -xf $package cd $packagedir cd .. rm -rf $packagedir sed -i "/${package}/d" ../${sect-ver}.wget sed -i "/${package}/d" ../${sect-ver}.md5 done mv ../${sect-ver}.wget.orig ../${sect-ver}.wget mv ../${sect-ver}.md5.orig ../${sect-ver}.md5 sudo /sbin/ ldconfig cdparanoia docbk gc iso-codes jpeg lynx ntp openldap OOo pine portmap psutils qpopper qt-x11-free sendmail slib tcl tcp_wrappers tetex tidy tk unzip wireless_tools whois Xorg zip - if [[ ! -f $PACKAGE ]] ; then if [[ -f $SRC_ARCHIVE/$PKG_DIR/$PACKAGE ]] ; then cp $SRC_ARCHIVE/$PKG_DIR/$PACKAGE $PACKAGE elif [[ -f $SRC_ARCHIVE/$PACKAGE ]] ; then cp $SRC_ARCHIVE/$PACKAGE $PACKAGE else wget ${FTP_SERVER}conglomeration/$PKG_DIR/$PACKAGE || \ wget || \ wget fi fi echo " $PACKAGE" | md5sum -c - wget wget wget sudo sh -c " " section= sect-ver= # make -k || true $SRC_DIR/MesaLib **EDITME EDITME**