summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorTom "Ravi" Hale2023-06-27 17:56:32 +0700
committerTom "Ravi" Hale2023-06-29 09:40:08 +0700
commit4be28600dd4cc277cf0bab6c60eab5ebea45c320 (patch)
tree8052092cc36b7c9fcec08899c18d4b5b90a4404c /PKGBUILD
parent7f4ddc5c90943f2a5ddb5d97be4614d8308497d8 (diff)
downloadaur-4be28600dd4cc277cf0bab6c60eab5ebea45c320.tar.gz
Improve source files extraction / deletion
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD26
1 files changed, 8 insertions, 18 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0900effcdd04..7333f24762ab 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -22,32 +22,22 @@ noextract=("${source[@]%%::*}") # Don't auto-extract anything
prepare() {
- wget -N "$url/$_appimage_path" # Only download again if server version is newer
-
- # Make download executable
- chmod 755 "$_appimage"
-
- # Extract user resources from inside the AppImage
- # All files in the directories specified are extracted
- # Note that --appimage-extract currently doesn't support recursive extraction:
- # https://github.com/AppImage/AppImageKit/issues/370
local extract_dirs=(usr/share/applications
usr/share/doc/nixnote2
usr/share/icons
usr/share/man/man1
- usr/share/nixnote2
- usr/share/nixnote2/help
- usr/share/nixnote2/translations)
+ usr/share/nixnote2)
- # Due to this issue, all --appimage-extract target directories must already exist
- # https://github.com/AppImage/AppImageKit/issues/363
- local dir
+ # Extract selected goodness from the AppImage
+ # All files in the directories specified are extracted recursively
+ chmod u+x "$_appimage"
+ # Option --appimage-extract complains if given multiple arguments, so here we go loopy-loo
for dir in "${extract_dirs[@]}"; do
- mkdir -p squashfs-root/"$dir"
- "./$_appimage" --appimage-extract "$dir/*"
+ "./$_appimage" --appimage-extract "$dir"
done
- rm -r squashfs-root/usr/share/"$_pkgname"/{java,images} # Remove non-human resources
+ # 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
}