mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-18 19:10:36 +02:00
replace more grep with rg
This commit is contained in:
parent
3fb5a52c5e
commit
4837c6a021
11 changed files with 12 additions and 12 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
! rg -qw 'archboot' /etc/hostname && return
|
||||
_install_files
|
||||
rm /usr/bin/{3cpio,blkid,gzip,journalctl,less,lsmod,mkfs.btrfs,\
|
||||
mountpoint,setfont,sulogin,systemctl}
|
||||
|
|
|
@ -15,7 +15,7 @@ usr/lib/{coreutils,cryptsetup,gconv,modules-load.d,p11-kit,pam.d,pkcs11,polkit-1
|
|||
usr/share/{bash-completion,dbus-1,factory,hwdata,i18n/locales,makepkg,nano,pacman/keyrings,polkit-1,readline,systemd,terminfo} \
|
||||
| tar -C "${_ROOTFS}" -xpf -
|
||||
# only run on archboot container
|
||||
if grep -qw 'archboot' /etc/hostname; then
|
||||
if rg -qw 'archboot' /etc/hostname; then
|
||||
_map _binary locale{-gen,def}
|
||||
_map _file /etc/locale.gen /usr/share/locale/locale.alias
|
||||
# only support UTF-8
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
! rg -qw 'archboot' /etc/hostname && return
|
||||
# remove pacman-init.service
|
||||
rm -f /tmp/etc/systemd/system/multi-user.target.wants/pacman-init.service
|
||||
rm -f /tmp/etc/systemd/system/pacman-init.service
|
||||
|
|
|
@ -16,7 +16,7 @@ _run ()
|
|||
# only take services from systemd package
|
||||
pacman -Sy &>"${_NO_LOG}"
|
||||
#shellcheck disable=SC2046
|
||||
_map _file $(pacman -Ql systemd | grep '/usr/lib/systemd/system/.' | choose 1)
|
||||
_map _file $(pacman -Ql systemd | rg '/usr/lib/systemd/system/.' | choose 1)
|
||||
_map _file /usr/lib/sysusers.d/{arch,basic}.conf
|
||||
# disable systemd services:
|
||||
for i in lvm2-{lvmpolld,monitor} systemd-{boot,random-seed,sysusers\
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
! rg -qw 'archboot' /etc/hostname && return
|
||||
_install_files
|
||||
rm /usr/bin/{\[,addpart,attr,b2sum,base{32,64},basenc,blk{discard,pr,zone},blockdev,bunzip2,\
|
||||
bz{cat,diff,grep,ip2,ip2recover,more},cal,capsh,ch{acl,con,cpu,grp,mem,oom,own,root,rt},\
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
! rg -qw 'archboot' /etc/hostname && return
|
||||
[[ -d /var/cache/pacman/pkg ]] && rm -r /var/cache/pacman/pkg
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
! rg -qw 'archboot' /etc/hostname && return
|
||||
_install_files
|
||||
rm /usr/bin/{badblocks,blkmapd,btrfs-{find-root,image,map-logical,select-super},btrfs{,ck,tune},\
|
||||
chattr,cifscreds,cifs.{idmap,upcall},compile_et,debugfs,\
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
! rg -qw 'archboot' /etc/hostname && return
|
||||
rm -r /lib/firmware
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
! rg -qw 'archboot' /etc/hostname && return
|
||||
_install_mods
|
||||
rm -r /lib/modules
|
||||
_MODS="" _MOD_DEPS=""
|
||||
|
|
|
@ -18,12 +18,12 @@ _run ()
|
|||
echo -e "|-----------|---------|--------|----------|---------|" >> "${_MOTD}"
|
||||
echo -e "| \e[1;92mALT+F1-F4\e[m | \e[1;92mALT+F5\e[m | \e[1;92mALT+F6\e[m | \e[1;92mALT+F11\e[m | \e[1;92mALT+F12\e[m |" >> "${_MOTD}"
|
||||
echo -e "-----------------------------------------------------" >> "${_MOTD}"
|
||||
if echo "${_HOOKS[@]}" | grep -qw net; then
|
||||
if echo "${_HOOKS[@]}" | rg -qw net; then
|
||||
#shellcheck disable=SC2129
|
||||
echo -e "\e[1mFor Additional Wi-Fi Authentification Or Online Help:\e[m" >> "${_MOTD}"
|
||||
echo -e " - Use the \e[1;92m'elinks'\e[m text mode browser." >> "${_MOTD}"
|
||||
fi
|
||||
if echo "${_HOOKS[@]}" | grep -qw installer; then
|
||||
if echo "${_HOOKS[@]}" | rg -qw installer; then
|
||||
#shellcheck disable=SC2129
|
||||
echo -e "\e[1mManage Archboot Environment:\e[m" >> "${_MOTD}"
|
||||
echo -e " - Use the \e[1;92m'launcher'\e[m or the expert \e[1;92m'update'\e[m script." >> "${_MOTD}"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
! rg -qw 'archboot' /etc/hostname && return
|
||||
_install_files
|
||||
rm /usr/bin/{arpd,arping,bridge,clockdiff,ctstat,dcb,devlink,\
|
||||
elinks,ethtool,genl,ifstat,lnstat,nstat,ssh,tracepath,rdma,rtacct,\
|
||||
|
|
Loading…
Reference in a new issue