summaryrefslogtreecommitdiffstats
path: root/docs/xz.example
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:12:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:12:14 +0000
commit4b8a0f3f3dcf60dac2ce308ea08d413a535af29f (patch)
tree0f09c0ad2a4d0f535d89040a63dc3a866a6606e6 /docs/xz.example
parentInitial commit. (diff)
downloadreprepro-81d3a2ce7e9c7d762cae2cc4d01ae11e2ed9b92d.tar.xz
reprepro-81d3a2ce7e9c7d762cae2cc4d01ae11e2ed9b92d.zip
Adding upstream version 5.4.4.upstream/5.4.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--docs/xz.example30
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/xz.example b/docs/xz.example
new file mode 100644
index 0000000..2725bb0
--- /dev/null
+++ b/docs/xz.example
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# Copy this script to your conf/ dir as xz.sh, make it executable
+# and add to some definition in conf/distributions
+# DscIndices: Sources Release . .gz xz.sh
+# DebIndices: Packages Release . .gz xz.sh
+# UDebIndices: Packages . .gz xz.sh
+# and you have .xz'd Packages and Sources.
+# (alternatively, if you are very brave, put the full path to this file in there)
+
+DIROFDIST="$1"
+NEWNAME="$2"
+OLDNAME="$3"
+# this can be old($3 exists), new($2 exists) or change (both):
+STATUS="$4"
+BASENAME="`basename "$OLDNAME"`"
+
+if [ "xPackages" = "x$BASENAME" ] || [ "xSources" = "x$BASENAME" ] ; then
+ if [ "x$STATUS" = "xold" ] ; then
+ if [ -f "$DIROFDIST/$OLDNAME.xz" ] ; then
+ echo "$OLDNAME.xz" >&3
+ else
+ xz -c -- "$DIROFDIST/$OLDNAME" >"$DIROFDIST/$OLDNAME.xz.new" 3>/dev/null
+ echo "$OLDNAME.xz.new" >&3
+ fi
+ else
+ xz -c -- "$DIROFDIST/$NEWNAME" >"$DIROFDIST/$OLDNAME.xz.new" 3>/dev/null
+ echo "$OLDNAME.xz.new" >&3
+ fi
+fi