@@ -4,13 +4,13 @@ source lib.sh
44# Raspbian
55RASPBIAN_TORRENT_URL=downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2024-11-19/2024-11-19-raspios-bookworm-arm64.img.xz.torrent
66RASPBIAN_SHA256=ea6e68c48d14c3d78af5471c0b288bbf6522fdd775241f74d8295d106d344300
7- RASPBIAN_IMAGE_FILE=$( basename $RASPBIAN_TORRENT_URL | sed -e " s/.xz.torrent//g" )
7+ RASPBIAN_IMAGE_FILE=$( basename " $RASPBIAN_TORRENT_URL " | sed -e ' s/.xz.torrent//g' )
88EXTRA_IMAGE_SIZE=1978MB
99MINIMAL_SPACE_LEFT=111111
1010
1111missing_deps=()
1212for prog in kpartx wget gpg parted qemu-arm-static aria2c jq curl; do
13- if ! type $prog & > /dev/null ; then
13+ if ! type " $prog " & > /dev/null; then
1414 missing_deps+=( " $prog " )
1515 fi
1616done
@@ -47,9 +47,9 @@ function _decompress_image {
4747function _disable_daemons {
4848 # Prevent services from being started inside the chroot.
4949 POLICY_RC_D=mnt/img_root/usr/sbin/policy-rc.d
50- echo " #!/bin/sh" >> $POLICY_RC_D
51- echo " exit 101" >> $POLICY_RC_D
52- chmod +x $POLICY_RC_D
50+ echo " #!/bin/sh" >> " $POLICY_RC_D "
51+ echo " exit 101" >> " $POLICY_RC_D "
52+ chmod +x " $POLICY_RC_D "
5353}
5454
5555function _enable_daemons {
@@ -60,16 +60,16 @@ function _enable_daemons {
6060function _disable_ld_preload {
6161 cfg=mnt/img_root/etc/ld.so.preload
6262
63- if grep -q ' ^[^#]' $cfg ; then
64- sed -i -e ' s/^/#/' $cfg || die " Could not disable ld.so.preload"
63+ if grep -q ' ^[^#]' " $cfg " ; then
64+ sed -i -e ' s/^/#/' " $cfg " || die " Could not disable ld.so.preload"
6565 fi
6666}
6767
6868function _enable_ld_preload {
6969 cfg=mnt/img_root/etc/ld.so.preload
7070
71- if grep -q ' ^#' $cfg ; then
72- sed -i -e ' s/^#//' $cfg || die " Could not enable ld.so.preload"
71+ if grep -q ' ^#' " $cfg " ; then
72+ sed -i -e ' s/^#//' " $cfg " || die " Could not enable ld.so.preload"
7373 fi
7474}
7575
0 commit comments