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