cyrus-sasl/make-no-dlcompatorsrp-tarball.sh
Petr Šabata 5299d93aea RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/cyrus-sasl#e6b724063170dc972e127f012171504e9c52263a
2020-10-14 23:27:14 +02:00

42 lines
953 B
Bash
Executable File

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