#!/hint/bash -euE # Copyright (C) 2023 Umorpha Systems # SPDX-License-Identifier: AGPL-3.0-or-later post_install+=(99:small:post_install) small:post_install() { local arg_mountpoint=$1 rm -f -- "$arg_mountpoint"/var/cache/pacman/pkg/* rm -f -- "$arg_mountpoint"/var/lib/pacman/sync/* # FIXME(lukeshu): Put this as NoExtract options in pacman.conf rm -rf "$arg_mountpoint"/usr/share/help rm -rf "$arg_mountpoint"/usr/share/gtk-doc rm -rf "$arg_mountpoint"/usr/share/doc rm -rf "$arg_mountpoint"/usr/share/man rm -rf "$arg_mountpoint"/usr/share/info local l for l in "$arg_mountpoint"/usr/share/locale/*; do case "$l" in */en*) :;; */locale.alias) :;; *) rm -rf -- "$l";; esac done for l in "$arg_mountpoint"/usr/share/i18n/locales/*; do case "$l" in */en*) :;; */iso*) :;; */translit_*) :;; */locales/i18n*) :;; */C) :;; */POSIX) :;; *) rm -rf -- "$l";; esac done for l in "$arg_mountpoint"/usr/share/i18n/charmaps/*; do case "$l" in */UTF-8.gz) :;; */ANSI_X3.4-1968.gz) :;; *) rm -rf -- "$l";; esac done }