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
_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
add_full_dir /usr/share/locale/${i}
add_full_dir "/usr/share/locale/${i}"
done
add_file /usr/share/locale/locale.alias
add_full_dir /usr/share/i18n/locales
# only support UTF-8
add_file /usr/share/i18n/charmaps/UTF-8.gz
# 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 'opcodes*' \) -delete
fi
@ -161,7 +161,7 @@ build ()
# proc-sys-fs-binfmt_misc.automount
add_symlink "/etc/systemd/system/proc-sys-fs-binfmt_misc.automount" "/dev/null"
# 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
add_symlink "/var/log/lastlog" "/dev/null"
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"
## fix for systemd >=245 set default.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
add_symlink "/etc/systemd/system-generators/systemd-gpt-auto-generator" "/dev/null"
### add udev
@ -204,7 +204,7 @@ build ()
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"
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
fi
### add nss p11-kit and ca certificates
@ -223,14 +223,14 @@ build ()
add_file /usr/share/p11-kit/modules/p11-kit-trust.module
### remove conflicting mkinitcpio files and grub
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/ukify \
${BUILDROOT}/usr/lib/tmpfiles.d/mkinitcpio.conf \
${BUILDROOT}/usr/share/bash-completion/completions/lsinitcpio \
${BUILDROOT}/usr/share/bash-completion/completions/mkinitcpio \
${BUILDROOT}/usr/share/bash-completion/completions/grub \
${BUILDROOT}/usr/lib/modules-load.d/cdrecord.conf
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/ukify" \
"${BUILDROOT}/usr/lib/tmpfiles.d/mkinitcpio.conf" \
"${BUILDROOT}/usr/share/bash-completion/completions/lsinitcpio" \
"${BUILDROOT}/usr/share/bash-completion/completions/mkinitcpio" \
"${BUILDROOT}/usr/share/bash-completion/completions/grub" \
"${BUILDROOT}/usr/lib/modules-load.d/cdrecord.conf"
### fix licenses
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
# fix libinih for plasma wallpaper
for i in /usr/lib/libINI*; do
add_file ${i}
add_file "${i}"
done
# fix licenses
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"
add_all_modules "/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}
find ${BUILDROOT}/lib/firmware -type f -name "*txt*" -exec rm {} \;
find ${BUILDROOT}/lib/firmware -type f -name "*README*" -exec rm {} \;
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 "*README*" -exec rm {} \;
}
help ()

View file

@ -25,6 +25,7 @@ build() {
done
# add custom bash options
echo ". /root/.bashrc" >> "${BUILDROOT}/etc/bash.bashrc"
#shellcheck disable=SC2129
echo ". /etc/profile.d/custom-bash-options.sh" >> "${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"

View file

@ -11,7 +11,7 @@ build ()
add_file "/usr/bin/archboot-update.sh" "/usr/bin/update"
add_file "/usr/share/archboot/gpg/tpowa.gpg"
# 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 ()

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}"
fi
if echo "${HOOKS[@]}" | grep -qw archboot_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}"
#shellcheck disable=SC2129
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}"
fi