@@ -32,16 +32,19 @@ 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 \
44+ && grep -q " snd_pcsp" airootfs/etc/modprobe.d/nobeep.conf 2> /dev/null; then
45+ log " PC speaker already disabled in airootfs configuration."
4346 else
44- log " Disabling PC speaker in configuration..."
47+ log " Disabling PC speaker in airootfs configuration..."
4548 mkdir -p airootfs/etc/modprobe.d/
4649 echo " blacklist pcspkr" > airootfs/etc/modprobe.d/nobeep.conf
4750 echo " blacklist snd_pcsp" >> airootfs/etc/modprobe.d/nobeep.conf
7679 # Set bell-style none in global inputrc
7780 if [ ! -f " airootfs/etc/inputrc" ]; then
7881 log " Setting bell-style none in global inputrc..."
82+ mkdir -p airootfs/etc
7983 echo " set bell-style none" > airootfs/etc/inputrc
8084 fi
8185
8690 # Note: We don't modify profiledef.sh anymore as -Xthreads is not supported by mksquashfs
8791 # The profiledef.sh file already has proper XZ compression settings
8892
89- # Run mkarchiso with verbose option only
93+ # Run mkarchiso with verbose option and handle errors
9094 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
95+ if mkarchiso -v -w " $work_dir " -o " $output_dir " . ; then
9596 log " ISO build completed successfully!"
9697 log " ISO available at: $output_dir "
9798 else
0 commit comments