2023-02-16 04:24:25 +00:00
|
|
|
#! /bin/bash -ex
|
|
|
|
|
|
|
|
# Download a release of lxml (if missing) and remove the isoschematron module from it
|
|
|
|
|
|
|
|
version=$1
|
|
|
|
|
|
|
|
if [ -z "${version}" ]; then
|
|
|
|
echo "Usage: $0 VERSION" >& 2
|
|
|
|
echo "" >& 2
|
|
|
|
echo "example: $0 4.9.2" >& 2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
versionedname=lxml-${version}
|
|
|
|
orig_archive=${versionedname}.tar.gz
|
2023-07-14 10:34:08 +00:00
|
|
|
new_archive=${versionedname}-no-isoschematron-rng.tar.gz
|
2023-02-16 04:24:25 +00:00
|
|
|
|
|
|
|
if [ ! -e ${orig_archive} ]; then
|
|
|
|
wget -N https://files.pythonhosted.org/packages/source/l/lxml/${orig_archive}
|
|
|
|
fi
|
|
|
|
|
2023-07-14 10:34:08 +00:00
|
|
|
deleted_directory=lxml-${version}/src/lxml/isoschematron/resources/rng
|
2023-02-16 04:24:25 +00:00
|
|
|
|
|
|
|
# tar --delete does not operate on compressed archives, so do
|
|
|
|
# gz decompression explicitly
|
|
|
|
gzip --decompress ${orig_archive}
|
2023-07-14 10:34:08 +00:00
|
|
|
tar -v --delete -f ${orig_archive//.gz} ${deleted_directory}
|
2023-02-16 04:24:25 +00:00
|
|
|
gzip -cf ${orig_archive//.gz} > ${new_archive}
|