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/${section}/${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**