#!/bin/sh # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ # # June 4 2003 - #export PATH=$PATH:~/bin CVS=~/bin/cvs source /sbin/functions.sh CHECKOUT=gentoo-projects/grsecurity/grsecurity_acls STORAGE=/home/${USER}/public_html/snapshots TARBALL=grsecurity-base-policy-`date +%Y%m%d`.tar.gz CO=`basename ${CHECKOUT}` [ -e ${CHECKOUT} ] && rm -rf ${CHECKOUT} [ -e ${CHECKOUT} ] && exit 1 ${CVS} -q -d:ext:${USER}@dev.gentoo.org:/home/cvsroot co ${CHECKOUT} if [ -d ${CHECKOUT} ] ; then cd ${CHECKOUT} || exit 1 find . -name CVS -type d | xargs rm -rf #find . -name SVN -type d | xargs rm -rf cd - [ -e "grsecurity-base-policy" ] && rm -rf grsecurity-base-policy mv ${CHECKOUT} grsecurity-base-policy tar zcf ${TARBALL} grsecurity-base-policy [ ! -f "${TARBALL}" ] && die "I cant locate the tarball named ${TARBALL}" EXTRA_JUNK="`tar ztf ${TARBALL} | grep -v .acl$ | grep -v /$`" [ "${EXTRA_JUNK}" != "" ] && ewarn "Extra JUNK found in ${TARBALL}\n${EXTRA_JUNK}\n" if [ "${STORAGE}" != "" ] ; then mkdir -p ${STORAGE} einfo "`tar ztf ${TARBALL} | grep acl$ | wc -l | awk '{print $1}'` acls in this tarball" cp ${TARBALL} ${STORAGE}/ || die "I cant move the tarball to ${STORAGE}" ls -l ${STORAGE}/${TARBALL} md5sum ${STORAGE}/${TARBALL} fi else eerror "I cant find ${CHECKOUT} in `pwd`" fi cd ${STORAGE} && /bin/ls -1 *-*-*-*.tar.gz | sort -r | head -20 | awk '{print ""$1"
\n"}' > ${CO}.html exit 0