mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
replace find with fd
This commit is contained in:
parent
a945ae0bf3
commit
ad40db1a5d
2 changed files with 10 additions and 10 deletions
|
@ -264,7 +264,7 @@ _fix_network() {
|
|||
_create_archboot_db() {
|
||||
echo "Creating archboot repository db..."
|
||||
#shellcheck disable=SC2046
|
||||
LANG=C repo-add -q "${1}"/archboot.db.tar.gz $(find "${1}"/ -type f ! -name '*.sig')
|
||||
LANG=C repo-add -q "${1}"/archboot.db.tar.gz $(fd -t f -E '*.sig' . "${1}"/)
|
||||
}
|
||||
|
||||
_pacman_parameters() {
|
||||
|
|
|
@ -67,15 +67,15 @@ _clean_container() {
|
|||
rm -r "${1}"/usr/share/{aclocal,applications,audit-rules,awk,common-lisp,emacs,et,fish,gettext,gettext-[0-9]*,glib-[0-9]*,gnupg,gtk-doc,iana-etc,icons,icu,keyutils,libalpm,libgpg-error,makepkg-template,misc,pixmaps,pkgconfig,screen,smartmontools,ss,tabset,vala,xml,man,doc,info,xtables}
|
||||
rm -r "${1}"/usr/lib/{audit,awk,binfmt.d,cmake,dracut,e2fsprogs,environment.d,gawk,getconf,gettext,glib-[0-9]*,gnupg,gssproxy,icu,krb5,ldscripts,libnl,pkgconfig,siconv,tar,xfsprogs,xtables}
|
||||
# locale cleaning
|
||||
find "${1}"/usr/share/locale/ -mindepth 2 ! -path '*/be/*' ! -path '*/bg/*' \
|
||||
! -path '*/cs/*' ! -path '*/da/*' ! -path '*/de/*' ! -path '*/en/*' \
|
||||
! -path '*/el/*' ! -path '*/es/*' ! -path '*/fi/*' ! -path '*/fr/*' \
|
||||
! -path '*/hu/*' ! -path '*/it/*' ! -path '*/lt/*' ! -path '*/lv/*' \
|
||||
! -path '*/mk/*' ! -path '*/nl/*' ! -path '*/nn/*' ! -path '*/pl/*' \
|
||||
! -path '*/pt/*' ! -path '*/ro/*' ! -path '*/ru/*' ! -path '*/sk/*' \
|
||||
! -path '*/sr/*' ! -path '*/sv/*' ! -path '*/tr/*' ! -path '*/uk/*' \
|
||||
-delete &>"${_NO_LOG}"
|
||||
find "${1}"/usr/share/i18n/charmaps ! -name 'UTF-8.gz' -delete &>"${_NO_LOG}"
|
||||
fd -u --min-depth 2 -E '*/be/*' -E '*/bg/*' \
|
||||
-E '*/cs/*' -E '*/da/*' -E '*/de/*' -E '*/en/*' \
|
||||
-E '*/el/*' -E '*/es/*' -E '*/fi/*' -E '*/fr/*' \
|
||||
-E '*/hu/*' -E '*/it/*' -E '*/lt/*' -E '*/lv/*' \
|
||||
-E '*/mk/*' -E '*/nl/*' -E '*/nn/*' -E '*/pl/*' \
|
||||
-E '*/pt/*' -E '*/ro/*' -E '*/ru/*' -E '*/sk/*' \
|
||||
-E '*/sr/*' -E '*/sv/*' -E '*/tr/*' -E '*/uk/*' \
|
||||
. "${1}"/usr/share/locale/ -X rm &>"${_NO_LOG}"
|
||||
fd -u -t f -E 'UTF-8.gz' . "${1}"/usr/share/i18n/charmaps -X rm &>"${_NO_LOG}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue