@@ -13,28 +13,28 @@ wget -c -nc "${url}"
1313wget -c -nc " ${url} .sha256"
1414
1515# make sure signature hasn't changed
16- head -c 64 ${file} .sha256 | grep -qx " ${sha256} "
16+ head -c 64 " ${file} .sha256" | grep -qx " ${sha256} "
1717
1818# verify signature
19- cat ${file} .sha256 | sha256sum --check
19+ sha256sum --check " ${file} .sha256"
2020
2121# unmount
22- umount -q ${device} ? || true
23- umount -q ${device} || true
22+ umount -q " ${device} ?" || true
23+ umount -q " ${device} " || true
2424
2525# new empty dos partition table
26- echo ' label: dos' | sfdisk $device
26+ echo ' label: dos' | sfdisk " $device "
2727
2828# write raspios
29- xzcat $file | dd bs=1M of=$device status=progress conv=fdatasync
29+ xzcat " $file " | dd bs=1M of=" $device " status=progress conv=fdatasync
3030
31- sudo partprobe $device
31+ sudo partprobe " $device "
3232
3333# find first partition
34- boot_partition=$( lsblk -ln -o NAME $device | sed -n ' 2p' )
34+ boot_partition=$( lsblk -ln -o NAME " $device " | sed -n ' 2p' )
3535
3636# mount boot partition
37- mount /dev/${boot_partition} /mnt
37+ mount /dev/" ${boot_partition} " /mnt
3838
3939# create user
4040echo " pi:$( echo ' copepode' | openssl passwd -6 -stdin) " > /mnt/userconf
@@ -43,6 +43,6 @@ echo "pi:$(echo 'copepode' | openssl passwd -6 -stdin)" > /mnt/userconf
4343touch /mnt/ssh
4444
4545# unmount boot partition
46- umount /dev/${boot_partition}
46+ umount /dev/" ${boot_partition} "
4747
4848echo " ✅ SD card is ready."
0 commit comments