diff --git a/hplip-rebase.sh b/hplip-rebase.sh deleted file mode 100755 index f33edca..0000000 --- a/hplip-rebase.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -if [ "$1" == "-h" -o "$1" == "--help" ] -then - echo "Usage: ./hplip-rebase.sh X.Y.Z" - echo " X.Y.Z - new hplip version" - exit 0 -fi - -wget -O hplip-plugin.run http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-$1-plugin.run - -if [ $? -gt 0 ] -then - echo "Error while downloading plugin. Check version passed by argument or internet connection. For usage run script with -h or --help argument." - rm hplip-plugin.run - exit 1 -fi -rm hplip-plugin.run - -fedpkg mockbuild -if [ $? -gt 0 ] -then - echo "Error during mockbuild." - exit 1 -fi -exit 0 diff --git a/hplip-repack.sh b/hplip-repack.sh index 7639dbe..c25fbb0 100755 --- a/hplip-repack.sh +++ b/hplip-repack.sh @@ -18,5 +18,15 @@ rm hplip-$VERSION/prnt/hpcups/ErnieFilter.{cpp,h} hplip-$VERSION/prnt/hpijs/erni # compress into a new tarball tar -cjvf hplip-$VERSION-repack.tar.gz hplip-$VERSION || exit 1 +# check whether plugin is available +wget -O hplip-plugin.run https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-$1-plugin.run || exit 1 + +# check whether the file is sane +file --mime hplip-plugin.run | grep 'x-shellscript' || exit 1 + +echo "hplip-${VERSION}-repack.tar.gz is prepared for uploading..." + +exit 0 + # upload a new source tarball #fedpkg new-sources hplip-$VERSION-repack.tar.gz || exit 1