@@ -32,16 +32,18 @@ build_iso() {
3232
3333 # Create necessary directories
3434 mkdir -p " $output_dir "
35+ mkdir -p " $work_dir "
3536
3637 # Run the mirror selection script
3738 log " Selecting fastest mirrors..."
3839 ./scripts/select-mirrors.sh || warn " Mirror selection failed, continuing with default mirrors"
3940
40- # Disable PC speaker module if present
41- if grep -q " pcspkr" /etc/modprobe.d/nobeep.conf 2> /dev/null; then
42- log " PC speaker already disabled in configuration."
41+ # Disable PC speaker module in airootfs if present
42+ if [ -f " airootfs/etc/modprobe.d/nobeep.conf" ] \
43+ && grep -q " pcspkr" airootfs/etc/modprobe.d/nobeep.conf 2> /dev/null; then
44+ log " PC speaker already disabled in airootfs configuration."
4345 else
44- log " Disabling PC speaker in configuration..."
46+ log " Disabling PC speaker in airootfs configuration..."
4547 mkdir -p airootfs/etc/modprobe.d/
4648 echo " blacklist pcspkr" > airootfs/etc/modprobe.d/nobeep.conf
4749 echo " blacklist snd_pcsp" >> airootfs/etc/modprobe.d/nobeep.conf
7678 # Set bell-style none in global inputrc
7779 if [ ! -f " airootfs/etc/inputrc" ]; then
7880 log " Setting bell-style none in global inputrc..."
81+ mkdir -p airootfs/etc
7982 echo " set bell-style none" > airootfs/etc/inputrc
8083 fi
8184
8689 # Note: We don't modify profiledef.sh anymore as -Xthreads is not supported by mksquashfs
8790 # The profiledef.sh file already has proper XZ compression settings
8891
89- # Run mkarchiso with verbose option only
92+ # Run mkarchiso with verbose option and handle errors
9093 log " Building Arch ISO with mkarchiso..."
91- mkarchiso -v -w " $work_dir " -o " $output_dir " .
92-
93- # Check if build was successful
94- if [ $? -eq 0 ]; then
94+ if mkarchiso -v -w " $work_dir " -o " $output_dir " . ; then
9595 log " ISO build completed successfully!"
9696 log " ISO available at: $output_dir "
9797 else
0 commit comments