Blame SOURCES/make-no-dlcompatorsrp-tarball.sh

794a5c
#!/bin/bash -e
794a5c
#
794a5c
#  See ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ for unmodified sources.
794a5c
#
794a5c
794a5c
tmppath=`mktemp -d ${TMPDIR:-/tmp}/make-no-dlcompat-tarball-XXXXXX`
794a5c
if test -z "$tmppath" ; then
794a5c
	echo Error creating temporary directory.
794a5c
	exit 1
794a5c
fi
794a5c
trap "rm -fr $tmppath" EXIT
794a5c
794a5c
initialdir=`pwd`
794a5c
794a5c
for tarball in ${initialdir}/cyrus-sasl-*.tar.{gz,bz2} ; do
794a5c
	if ! test -s "$tarball" ; then
794a5c
		continue
794a5c
	fi
794a5c
	rm -fr $tmppath/*
794a5c
	pushd $tmppath > /dev/null
794a5c
	case "$tarball" in
794a5c
	*nodlcompat*)
794a5c
		: Do nothing.
794a5c
		;;
794a5c
	*.gz)
794a5c
		gzip  -dc "$tarball" | tar xf -
794a5c
		rm -fr cyrus-sasl-*/dlcompat*
794a5c
		rm -fr cyrus-sasl-*/plugins/srp*
794a5c
		tar cf - * | gzip  -9c > \
794a5c
		$initialdir/`basename $tarball .tar.gz`-nodlcompatorsrp.tar.gz
794a5c
		;;
794a5c
	*.bz2)
794a5c
		bzip2 -dc "$tarball" | tar xf -
794a5c
		rm -fr cyrus-sasl-*/dlcompat*
794a5c
		rm -fr cyrus-sasl-*/plugins/srp*
794a5c
		tar cf - * | bzip2 -9c > \
794a5c
		$initialdir/`basename $tarball .tar.bz2`-nodlcompatorsrp.tar.bz2
794a5c
		;;
794a5c
	esac
794a5c
	popd > /dev/null
794a5c
done