shellcheck fixes

This commit is contained in:
Tobias Powalowski 2023-09-04 09:47:58 +02:00
parent 55456b429a
commit 7e1649aa0c
6 changed files with 20 additions and 19 deletions

View file

@ -62,14 +62,14 @@ build ()
add_file /etc/locale.gen add_file /etc/locale.gen
_LANG="be bg cs da de en el es fi fr hu it lt lv mk nl nn pl pt ro ru sk sr sv uk" _LANG="be bg cs da de en el es fi fr hu it lt lv mk nl nn pl pt ro ru sk sr sv uk"
for i in ${_LANG}; do for i in ${_LANG}; do
add_full_dir /usr/share/locale/${i} add_full_dir "/usr/share/locale/${i}"
done done
add_file /usr/share/locale/locale.alias add_file /usr/share/locale/locale.alias
add_full_dir /usr/share/i18n/locales add_full_dir /usr/share/i18n/locales
# only support UTF-8 # only support UTF-8
add_file /usr/share/i18n/charmaps/UTF-8.gz add_file /usr/share/i18n/charmaps/UTF-8.gz
# remove conflicting files from not installed packages: binutils, grub and gdbm # remove conflicting files from not installed packages: binutils, grub and gdbm
find ${BUILDROOT}/usr/share/locale/ -type f \( -name 'grub*' -o -name 'binutils*' -o -name 'gdbm*' -o -name 'bfd*' \ find "${BUILDROOT}/usr/share/locale/" -type f \( -name 'grub*' -o -name 'binutils*' -o -name 'gdbm*' -o -name 'bfd*' \
-o -name 'gettext*' -o -name 'gas*' -o -name 'gold*' -o -name 'gprof*' -o -name 'ld*' \ -o -name 'gettext*' -o -name 'gas*' -o -name 'gold*' -o -name 'gprof*' -o -name 'ld*' \
-o -name 'opcodes*' \) -delete -o -name 'opcodes*' \) -delete
fi fi
@ -161,7 +161,7 @@ build ()
# proc-sys-fs-binfmt_misc.automount # proc-sys-fs-binfmt_misc.automount
add_symlink "/etc/systemd/system/proc-sys-fs-binfmt_misc.automount" "/dev/null" add_symlink "/etc/systemd/system/proc-sys-fs-binfmt_misc.automount" "/dev/null"
# remove multi-user.target.wants # remove multi-user.target.wants
rm -rf ${BUILDROOT}/etc/systemd/system/multi-user.target.wants rm -rf "${BUILDROOT}/etc/systemd/system/multi-user.target.wants"
# disable lastlog # disable lastlog
add_symlink "/var/log/lastlog" "/dev/null" add_symlink "/var/log/lastlog" "/dev/null"
add_file "/usr/share/archboot/base/etc/tmpfiles.d/var.conf" "/etc/tmpfiles.d/var.conf" add_file "/usr/share/archboot/base/etc/tmpfiles.d/var.conf" "/etc/tmpfiles.d/var.conf"
@ -172,7 +172,7 @@ build ()
map add_file "/usr/lib/libnss_compat.so.2" "/usr/lib/libnsl.so.1" map add_file "/usr/lib/libnss_compat.so.2" "/usr/lib/libnsl.so.1"
## fix for systemd >=245 set default.target ## fix for systemd >=245 set default.target
# remove initrd-release to allow normal systemd boot without initrd.target # remove initrd-release to allow normal systemd boot without initrd.target
rm -f ${BUILDROOT}/etc/initrd-release rm -f "${BUILDROOT}/etc/initrd-release"
# mask systemd-gpt-auto-generator, errors out on initramfs usage # mask systemd-gpt-auto-generator, errors out on initramfs usage
add_symlink "/etc/systemd/system-generators/systemd-gpt-auto-generator" "/dev/null" add_symlink "/etc/systemd/system-generators/systemd-gpt-auto-generator" "/dev/null"
### add udev ### add udev
@ -204,7 +204,7 @@ build ()
memtest86+-efi mkinitcpio-busybox mtools libsysprof-capture libnsl libksba gdbm binutils \ memtest86+-efi mkinitcpio-busybox mtools libsysprof-capture libnsl libksba gdbm binutils \
cdrtools systemd-ukify python python-pefile limine man-pages libev libpipeline groff db db5.3" cdrtools systemd-ukify python python-pefile limine man-pages libev libpipeline groff db db5.3"
for i in ${_RM_PACMAN_DB}; do for i in ${_RM_PACMAN_DB}; do
rm -rf ${BUILDROOT}/var/lib/pacman/local/"${i}"-[0-9]* &>"${_NO_LOG}" rm -rf "${BUILDROOT}"/var/lib/pacman/local/"${i}"-[0-9]* &>"${_NO_LOG}"
done done
fi fi
### add nss p11-kit and ca certificates ### add nss p11-kit and ca certificates
@ -223,14 +223,14 @@ build ()
add_file /usr/share/p11-kit/modules/p11-kit-trust.module add_file /usr/share/p11-kit/modules/p11-kit-trust.module
### remove conflicting mkinitcpio files and grub ### remove conflicting mkinitcpio files and grub
rm ${BUILDROOT}/usr/lib/systemd/system/mkinitcpio-generate-shutdown-ramfs.service \ rm "${BUILDROOT}/usr/lib/systemd/system/mkinitcpio-generate-shutdown-ramfs.service" \
${BUILDROOT}/usr/lib/systemd/system/shutdown.target.wants/mkinitcpio-generate-shutdown-ramfs.service \ "${BUILDROOT}/usr/lib/systemd/system/shutdown.target.wants/mkinitcpio-generate-shutdown-ramfs.service" \
${BUILDROOT}/usr/lib/systemd/ukify \ "${BUILDROOT}/usr/lib/systemd/ukify" \
${BUILDROOT}/usr/lib/tmpfiles.d/mkinitcpio.conf \ "${BUILDROOT}/usr/lib/tmpfiles.d/mkinitcpio.conf" \
${BUILDROOT}/usr/share/bash-completion/completions/lsinitcpio \ "${BUILDROOT}/usr/share/bash-completion/completions/lsinitcpio" \
${BUILDROOT}/usr/share/bash-completion/completions/mkinitcpio \ "${BUILDROOT}/usr/share/bash-completion/completions/mkinitcpio" \
${BUILDROOT}/usr/share/bash-completion/completions/grub \ "${BUILDROOT}/usr/share/bash-completion/completions/grub" \
${BUILDROOT}/usr/lib/modules-load.d/cdrecord.conf "${BUILDROOT}/usr/lib/modules-load.d/cdrecord.conf"
### fix licenses ### fix licenses
map add_file /usr/share/licenses/shadow/COPYING /usr/share/licenses/iana-etc/LICENSE \ map add_file /usr/share/licenses/shadow/COPYING /usr/share/licenses/iana-etc/LICENSE \

View file

@ -26,7 +26,7 @@ build ()
map add_full_dir /etc/cifs-utils /etc/request-key.d /etc/nvme map add_full_dir /etc/cifs-utils /etc/request-key.d /etc/nvme
# fix libinih for plasma wallpaper # fix libinih for plasma wallpaper
for i in /usr/lib/libINI*; do for i in /usr/lib/libINI*; do
add_file ${i} add_file "${i}"
done done
# fix licenses # fix licenses
add_file "/usr/share/licenses/e2fsprogs/MIT-LICENSE" add_file "/usr/share/licenses/e2fsprogs/MIT-LICENSE"

View file

@ -8,9 +8,9 @@ build ()
map add_full_dir "/lib/firmware" "/usr/share/licenses/linux-firmware" map add_full_dir "/lib/firmware" "/usr/share/licenses/linux-firmware"
add_all_modules "/firmware/" add_all_modules "/firmware/"
# remove not used firmware # remove not used firmware
rm -rf ${BUILDROOT}/lib/firmware/{amphion,as102*,atusb,av7110,cadence,cavium,cmmb*,cis,cpia2,cnm,ct*,cxgb*,cmmb*,dabusb,dpaa2,dsp56k,dvb*,edgeport,emi26,emi62,ess,f2255usb*,go7007,hfi1*,inside-secure,isdbt*,keyspan*,korg,meson,lgs8g75*,lt9611uxc*,moxa,mts*,myri10ge*,myricom,nxp,ositech,qat*,sb16,s2250*,s5p-*,sms1*,rtl_bt,tdmb*,ttusb-budget,ueagle-atm,usbdux*,ti,ti-keystone,v4l*,vicam,vxge,whiteheat*,yam,yamaha} rm -rf "${BUILDROOT}"/lib/firmware/{amphion,as102*,atusb,av7110,cadence,cavium,cmmb*,cis,cpia2,cnm,ct*,cxgb*,cmmb*,dabusb,dpaa2,dsp56k,dvb*,edgeport,emi26,emi62,ess,f2255usb*,go7007,hfi1*,inside-secure,isdbt*,keyspan*,korg,meson,lgs8g75*,lt9611uxc*,moxa,mts*,myri10ge*,myricom,nxp,ositech,qat*,sb16,s2250*,s5p-*,sms1*,rtl_bt,tdmb*,ttusb-budget,ueagle-atm,usbdux*,ti,ti-keystone,v4l*,vicam,vxge,whiteheat*,yam,yamaha}
find ${BUILDROOT}/lib/firmware -type f -name "*txt*" -exec rm {} \; find "${BUILDROOT}/lib/firmware" -type f -name "*txt*" -exec rm {} \;
find ${BUILDROOT}/lib/firmware -type f -name "*README*" -exec rm {} \; find "${BUILDROOT}/lib/firmware" -type f -name "*README*" -exec rm {} \;
} }
help () help ()

View file

@ -25,6 +25,7 @@ build() {
done done
# add custom bash options # add custom bash options
echo ". /root/.bashrc" >> "${BUILDROOT}/etc/bash.bashrc" echo ". /root/.bashrc" >> "${BUILDROOT}/etc/bash.bashrc"
#shellcheck disable=SC2129
echo ". /etc/profile.d/custom-bash-options.sh" >> "${BUILDROOT}/root/.bashrc" echo ". /etc/profile.d/custom-bash-options.sh" >> "${BUILDROOT}/root/.bashrc"
echo "alias reboot='echo b >/proc/sysrq-trigger'" >> "${BUILDROOT}/root/.bashrc" echo "alias reboot='echo b >/proc/sysrq-trigger'" >> "${BUILDROOT}/root/.bashrc"
echo "alias poweroff='echo o >/proc/sysrq-trigger'" >> "${BUILDROOT}/root/.bashrc" echo "alias poweroff='echo o >/proc/sysrq-trigger'" >> "${BUILDROOT}/root/.bashrc"

View file

@ -11,7 +11,7 @@ build ()
add_file "/usr/bin/archboot-update.sh" "/usr/bin/update" add_file "/usr/bin/archboot-update.sh" "/usr/bin/update"
add_file "/usr/share/archboot/gpg/tpowa.gpg" add_file "/usr/share/archboot/gpg/tpowa.gpg"
# use /etc/profile to launch login.sh # use /etc/profile to launch login.sh
echo ". /usr/lib/archboot/login.sh" >> ${BUILDROOT}/root/.bashrc echo ". /usr/lib/archboot/login.sh" >> "${BUILDROOT}/root/.bashrc"
} }
help () help ()

View file

@ -21,9 +21,9 @@ if echo "${HOOKS[@]}" | grep -qw archboot_net; then
echo -e " - Use the \e[1;92m'weechat'\e[m IRC client." >> "${MOTD}" echo -e " - Use the \e[1;92m'weechat'\e[m IRC client." >> "${MOTD}"
fi fi
if echo "${HOOKS[@]}" | grep -qw archboot_installer; then if echo "${HOOKS[@]}" | grep -qw archboot_installer; then
#shellcheck disable=SC2129
echo -e "\e[1mManage Archboot Environment:\e[m" >> "${MOTD}" 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}" echo -e " - Use the \e[1;92m'launcher'\e[m or the expert \e[1;92m'update'\e[m script." >> "${MOTD}"
#shellcheck disable=SC2129
echo -e "\e[1mInstallation:\e[m" >> "${MOTD}" echo -e "\e[1mInstallation:\e[m" >> "${MOTD}"
echo -e " - Use the \e[1;92m'setup'\e[m or the expert \e[1;92m'quickinst'\e[m script." >> "${MOTD}" echo -e " - Use the \e[1;92m'setup'\e[m or the expert \e[1;92m'quickinst'\e[m script." >> "${MOTD}"
fi fi