f5837c1
#!/usr/bin/bash
f5837c1
f5837c1
f5837c1
VERSION=$1
f5837c1
f5837c1
if [ "${VERSION:="*"}" == "*" ]
f5837c1
then
f5837c1
  echo "Define a version of hplip as an argument."
f5837c1
  exit 1
f5837c1
fi
f5837c1
f5837c1
# extract the original tarball
f5837c1
tar -xaf hplip-$VERSION.tar.gz || exit 1
f5837c1
f5837c1
# remove unwanted files
f5837c1
rm hplip-$VERSION/prnt/hpcups/ErnieFilter.{cpp,h} hplip-$VERSION/prnt/hpijs/ernieplatform.h || exit 1
f5837c1
f5837c1
# compress into a new tarball
f5837c1
tar -cjvf hplip-$VERSION-repack.tar.gz hplip-$VERSION || exit 1
f5837c1
f5837c1
# upload a new source tarball
f5837c1
#fedpkg new-sources hplip-$VERSION-repack.tar.gz || exit 1