Split logic out
This commit is contained in:
parent
03b9a9e711
commit
c15b76e83c
4
start.sh
4
start.sh
|
@ -15,8 +15,10 @@ function main() {
|
|||
./step_1_debootstrap.sh
|
||||
# Then setup and run chroot...
|
||||
./step_2_chroot.sh
|
||||
# Create the boot structure data...
|
||||
./step_3_create_boot_structure.sh
|
||||
# Create the CD...
|
||||
./step_3_create_CD.sh
|
||||
./step_4_create_CD.sh
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@ function main() {
|
|||
remix_recognition;
|
||||
echo "Creating MD5 data..."
|
||||
md5_cal;
|
||||
echo "Creating the ISO file..."
|
||||
createIso;
|
||||
}
|
||||
|
||||
function move_iso_linux_parts() {
|
||||
|
@ -89,21 +87,9 @@ function remix_recognition() {
|
|||
|
||||
function md5_cal() {
|
||||
sudo -s
|
||||
(cd image && find . -type f -print0 | xargs -0 md5sum | grep -v "\./md5sum.txt" > md5sum.txt)
|
||||
(cd image/ && find . -type f -print0 | xargs -0 md5sum | grep -v "\./md5sum.txt" > md5sum.txt)
|
||||
exit
|
||||
}
|
||||
|
||||
function createIso() {
|
||||
cd image/
|
||||
sudo mkisofs -r -V "${OS_NAME}" -cache-inodes -J -l \
|
||||
-b isolinux/isolinux.bin \
|
||||
-c isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
|
||||
-boot-info-table -o ../"${OS_NAME}".iso .
|
||||
cd ..
|
||||
# sudo mkisofs -D -r -cache-inodes -J -l -b isolinux/isolinux.bin -c \
|
||||
# isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o \
|
||||
# ../"${OS_NAME}".iso .
|
||||
|
||||
}
|
||||
|
||||
main $@;
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
. CONFIG.sh
|
||||
|
||||
# set -o xtrace ## To debug scripts
|
||||
# set -o errexit ## To exit on error
|
||||
# set -o errunset ## To exit if a variable is referenced but not set
|
||||
|
||||
|
||||
function main() {
|
||||
echo "Creating the ISO file..."
|
||||
cd image/
|
||||
sudo mkisofs -r -V "${OS_NAME}" -cache-inodes -J -l \
|
||||
-b isolinux/isolinux.bin \
|
||||
-c isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
|
||||
-boot-info-table -o ../"${OS_NAME}".iso .
|
||||
cd ..
|
||||
# sudo mkisofs -D -r -cache-inodes -J -l -b isolinux/isolinux.bin -c \
|
||||
# isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o \
|
||||
# ../"${OS_NAME}".iso .
|
||||
|
||||
}
|
||||
|
||||
main $@;
|
Loading…
Reference in New Issue