summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom "Ravi" Hale2023-06-27 17:57:18 +0700
committerTom "Ravi" Hale2023-06-29 09:40:08 +0700
commit5160a54aa77fe23e769313955b925f77936d7584 (patch)
treead8f9ee36064694325dcaeec30a5ce6b77e727ce
parent4be28600dd4cc277cf0bab6c60eab5ebea45c320 (diff)
downloadaur-5160a54aa77fe23e769313955b925f77936d7584.tar.gz
Don't gzip already gzipped man pages
-rw-r--r--PKGBUILD8
1 files changed, 7 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 7333f24762ab..e00b9ef4235d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,6 +20,7 @@ source=('https://github.com/robert7/nixnote2/releases/download/continuous/'"$_ap
b2sums=(SKIP) # Source will change as new versions are released
noextract=("${source[@]%%::*}") # Don't auto-extract anything
+shopt -s extglob # Used to ignore .gz files below (must be set outside function)
prepare() {
local extract_dirs=(usr/share/applications
@@ -38,7 +39,12 @@ prepare() {
# Remove non-human readable resources
rm -r squashfs-root/usr/share/"$_pkgname"/{java,images,translations}
- gzip -9 squashfs-root/usr/share/man/man1/* # On Arch, all pages are gzipped
+
+ # On Arch, all man pages are gzipped, but...
+ # gzip can't be told not to ask about overwriting existing .gz files
+ # If stdin is not a tty, it skips them, but exits non-zero.
+ # So pre-filter any .gz files with an extended glob
+ gzip -9 --force squashfs-root/usr/share/man/man1/!(*.gz)
}