some polishing
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Fri, 23 Jun 2023 00:57:05 +0000 (10:57 +1000)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Fri, 23 Jun 2023 00:57:05 +0000 (10:57 +1000)
packiso.sh

index aed2a7e76640cb1caf56bc975b4b4c6b76d806d8..ce72a68ef0114ba9ec54ba4bd2eff982ce08d77b 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Run xorriso to make a bootable ISO of bootimage.raw; a hybrid, nulti
+# Run xorriso to make a bootable ISO of bootimage.raw; a hybrid, multi
 # mode bootable ISO.
 
 set -e
@@ -9,11 +9,10 @@ ISOTREE=isotree
 ISO=tiniest.iso
 P1=part1.raw # $ISOTREE/part1.raw
 
-echo "# Prepare ISO content tree"
-
+echo "# Prepare ISO content tree unless it's already set up"
 if [ ! -d $ISOTREE ] ; then
     mkdir $ISOTREE
-    #touch $ISOTREE/catalog # Boot catalog
+
     # Determine start and size of first parition
     X=( $(sfdisk -l -ostart,sectors bootimage.raw | tail -n 2) )
     dd if=bootimage.raw of=$P1 skip=${X[0]} count=${X[1]}
@@ -25,18 +24,10 @@ if [ ! -d $ISOTREE ] ; then
     cp kernel/usr/lib/ISOLINUX/isolinux.bin $ISOTREE/boot/isolinux
     cp syslinux-iso.cfg $ISOTREE/boot/isolinux/syslinux.cfg
     mcopy -i $P1 ::/splash.png ::/vmlinuz $ISOTREE/
-
-    #mkdir -p $ISOTREE/EFI/BOOT
-    #cp kernel/usr/lib/SYSLINUX.EFI/efi64/syslinux.efi \
-    #   $ISOTREE/EFI/BOOT/bootia64.efi
-    #cp $ISOTREE/boot/isolinux/*.* $ISOTREE/EFI/boot/
-    
-    #mcopy -i $P1 ::/ldlinux.sys ::/ldlinux.c32 $ISOTREE/
-    #mcopy -i $P1 ::/initrd.gz $ISOTREE/
-    #cp devuan/initrd.gz $ISOTREE/
 fi
 
-[ ! -r $ISO ] || rm $ISO
+[ -r $ISO ] && rm $ISO
+
 PREPID="'$(id -un), $(getent passwd $(id -un)|awk -F: '{print $5}')'"
 
 XORRISO=(