Compare commits

...

1 Commits

Author SHA1 Message Date
11dd9be3f1 comp (#56)
Reviewed-on: #56
Co-authored-by: artoo <artoo@artixlinux.org>
Co-committed-by: artoo <artoo@artixlinux.org>
2021-07-13 11:07:33 +02:00
4 changed files with 17 additions and 6 deletions

View File

@@ -221,6 +221,8 @@ display_settings(){
msg "ISO SETTINGS:" msg "ISO SETTINGS:"
msg2 "ISO_VERSION: %s" "${ISO_VERSION}" msg2 "ISO_VERSION: %s" "${ISO_VERSION}"
msg2 "COMPRESSION: %s" "${COMPRESSION}"
[[ "${COMPRESSION}" == 'zstd' ]] && msg2 "COMPRESSION_LEVEL: %s" "${COMPRESSION_LEVEL}"
msg "BUILD:" msg "BUILD:"
show_profile show_profile

View File

@@ -14,7 +14,8 @@
# gpg key; leave empty or commented to skip img signing # gpg key; leave empty or commented to skip img signing
# GPG_KEY="" # GPG_KEY=""
# mksquashfs compression # possible values: zstd (default), xz
# default: zstd <compression-level> should be 1 .. 22 (default 15) # COMPRESSION="zstd"
# optional xz args: COMPRESSION_ARGS=(-comp xz -Xbcj x86)
#COMPRESSION_ARGS=(-comp zstd -Xcompression-level 22) # zstd only: range 1..22
# COMPRESSION_LEVEL=15

View File

@@ -67,7 +67,7 @@ make_sfs() {
mksfs_args+=("${sfs_out}") mksfs_args+=("${sfs_out}")
mksfs_args+=("${COMPRESSION_ARGS[@]}" -noappend) mksfs_args+=(-comp "${COMPRESSION}" "${COMPRESSION_ARGS[@]}" -noappend)
mksquashfs "${mksfs_args[@]}" mksquashfs "${mksfs_args[@]}"

View File

@@ -19,8 +19,16 @@ load_iso_config(){
GPG_KEY=${GPG_KEY:-''} GPG_KEY=${GPG_KEY:-''}
COMPRESSION="${COMPRESSION:-zstd}"
COMPRESSION_LEVEL="${COMPRESSION_LEVEL:-15}"
if [[ -z "${COMPRESSION_ARGS[*]}" ]]; then if [[ -z "${COMPRESSION_ARGS[*]}" ]]; then
COMPRESSION_ARGS=(-comp zstd -Xcompression-level 22) COMPRESSION_ARGS=(-Xcompression-level "${COMPRESSION_LEVEL}")
fi
if [[ "${COMPRESSION}" == 'xz' ]]; then
COMPRESSION_ARGS=(-Xbcj x86)
fi fi
return 0 return 0