Skip to content

Commit 67e42b5

Browse files
Optimize ISO build process by adding XZ thread parameter to profiledef.sh and improving logging for parallel compression
1 parent 44dabf0 commit 67e42b5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

scripts/entrypoint.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,15 @@ EOF
8383
export JOBS=$(nproc)
8484
log "Using $JOBS processors for parallel compression"
8585

86-
# Run mkarchiso with optimized parameters
87-
log "Building Arch ISO with mkarchiso..."
88-
MKARCHISO_OPTS="-v"
89-
if [ "$JOBS" -gt 1 ]; then
90-
MKARCHISO_OPTS+=" -C xz:threads=$JOBS"
86+
# Check if thread parameter is already in profiledef.sh
87+
if ! grep -q '\-Xthreads' profiledef.sh; then
88+
log "Adding XZ thread parameter to profiledef.sh"
89+
sed -i '/airootfs_image_tool_options=/s/)/ \x27-Xthreads\x27 \x27'"$JOBS"'\x27)/' profiledef.sh
9190
fi
9291

93-
mkarchiso $MKARCHISO_OPTS -w "$work_dir" -o "$output_dir" .
92+
# Run mkarchiso with verbose option only (no thread parameter on command line)
93+
log "Building Arch ISO with mkarchiso..."
94+
mkarchiso -v -w "$work_dir" -o "$output_dir" .
9495

9596
# Check if build was successful
9697
if [ $? -eq 0 ]; then

0 commit comments

Comments
 (0)