Valid options are:
-h | --help This help
-a | --arch The architecture to work with [ default i386 ]
-d | --dest-dir The destination dir prefix [ default /var/ftp ]
-i | --iso-dir The source iso dir prefix [ default /var/ftp ]
-r | --release The release name [ default beta/null ]
If you cannot loop mount a file on an NFS filesystem,
e.g. 2.2.x kernel based systems, you should copy your
iso images to a local directory and override the iso-dir
and dest-dir defaults.
e.g.
# mkdir -p /mnt/scratch/ftp/pub/redhat/linux/RELEASE/en/iso/i386/
if ( ls $arch_isodir/*-$arch-*.iso > /dev/null 2>&1 ) ; then
for disc in $arch_isodir/*-$arch-*.iso; do
echo Expanding `basename $disc` ...
mount -o loop $disc $MNTPNT
if ( cd $MNTPNT && pax -rw ./* $archdir ); then
umount $MNTPNT
echo Done
else
umount $MNTPNT
exit 1
fi
done
else
echo "Unable to find $arch_isodir/*-$arch-*.iso"
fi
}
if ( ls $arch_isodir/*-SRPMS-*.iso > /dev/null 2>&1 ) ; then
for disc in $arch_isodir/*-SRPMS-*.iso; do
echo Expanding `basename $disc` ...
mount -o loop $disc $MNTPNT
if ( cd $MNTPNT/SRPMS && pax -rw ./* $srpms_dir ); then
umount $MNTPNT
echo Done
else
umount $MNTPNT
exit 1
fi
done
else
echo "Unable to find $arch_isodir/*-SRPMS-*.iso"
fi
}
do_docs() {
# Usage: do_docs
mkdir -p $DOC_DIR
if ( ls ${DOC_ISO_DIR}/*-docs.iso ) ; then
for disc in ${DOC_ISO_DIR}/*-docs.iso; do
echo Expanding `basename $disc` ...
mount -o loop $disc $MNTPNT
if ( cd $MNTPNT && pax -rw ./* $DOC_DIR ); then
umount $MNTPNT
echo Done
else
umount $MNTPNT
exit 1
fi
done
else
echo "Unable to find $arch_isodir/*-docs.iso"
fi
}
clean_trans_tbl() {
# Usage: clean_trans_tbl dir
dir=$1
echo "Removing TRANS.TBL files from $1"
find $dir -type f -name TRANS.TBL | xargs rm -f
}
set_owner() {
# Usage: set_owner dir
dir=$1
echo "Setting user/group ownership for $1"
# Do this in 2 steps to be more portable between *NIX systems
chown -R $OWNER $dir
chgrp -R $OWNER_GRP $dir
}
if [ "$DO_DOC" = "yes" ]; then
docdir=$DOC_DIR
if [ -d $docdir ] ; then
echo "Removing existing documentation in $docdir"
rm -rf $docdir
fi
do_docs
clean_trans_tbl $docdir
set_owner $docdir
fi
for arch in $ARCH_LIST; do
archdir=$OS_BASE_DIR/$arch
if [ -d $archdir ] ; then
echo "Removing existing distribution in $archdir"
rm -rf $archdir
fi