summaryrefslogtreecommitdiff
path: root/hplip-repack.sh
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-05 02:45:17 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-05 02:45:17 +0000
commit92ff4cdf8c84e91584dd6076aa5b3c774ab0a622 (patch)
tree6ba01d84d85f00b380477077d920c341c3570b09 /hplip-repack.sh
parentd8ce4006ffe8011c16c265205aa330c52a0de0c1 (diff)
automatic import of hplipopeneuler24.03_LTS
Diffstat (limited to 'hplip-repack.sh')
-rwxr-xr-xhplip-repack.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/hplip-repack.sh b/hplip-repack.sh
new file mode 100755
index 0000000..7639dbe
--- /dev/null
+++ b/hplip-repack.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/bash
+
+
+VERSION=$1
+
+if [ "${VERSION:="*"}" == "*" ]
+then
+ echo "Define a version of hplip as an argument."
+ exit 1
+fi
+
+# extract the original tarball
+tar -xaf hplip-$VERSION.tar.gz || exit 1
+
+# remove unwanted files
+rm hplip-$VERSION/prnt/hpcups/ErnieFilter.{cpp,h} hplip-$VERSION/prnt/hpijs/ernieplatform.h || exit 1
+
+# compress into a new tarball
+tar -cjvf hplip-$VERSION-repack.tar.gz hplip-$VERSION || exit 1
+
+# upload a new source tarball
+#fedpkg new-sources hplip-$VERSION-repack.tar.gz || exit 1