Commit e1eb050f authored by Stefano Capitani's avatar Stefano Capitani

Introduce -d flag to set the compression level of the ISO ... we can set -d...

Introduce -d flag to set the compression level of the ISO ... we can set -d lz4 to compress more fast the iso ( useful for debug purpose ) . Default is xz but in manjaro-tools.conf we can set the level in permanent way .. Reintroduce this option from the m-t 0.13.x series
parent 3e804629
...@@ -79,7 +79,8 @@ display_settings(){ ...@@ -79,7 +79,8 @@ display_settings(){
msg "ISO INFO:" msg "ISO INFO:"
msg2 "iso_label: %s" "${iso_label}" msg2 "iso_label: %s" "${iso_label}"
msg2 "iso_compression: %s" "${iso_compression}"
msg "BUILD QUEUE:" msg "BUILD QUEUE:"
run show_profile "${build_list_iso}" run show_profile "${build_list_iso}"
} }
...@@ -116,6 +117,8 @@ usage() { ...@@ -116,6 +117,8 @@ usage() {
echo ' -m Set SquashFS image mode to persistence' echo ' -m Set SquashFS image mode to persistence'
echo ' -c Disable clean work dir' echo ' -c Disable clean work dir'
echo ' -f Build full ISO (extra=true)' echo ' -f Build full ISO (extra=true)'
echo ' -d <comp> Compression used for build ISO: xz, gzip, lzma, lzo, lz4'
echo " [default: ${iso_compression}]"
echo ' -x Build images only' echo ' -x Build images only'
echo ' -z Generate iso only' echo ' -z Generate iso only'
echo ' Requires pre built images (-x)' echo ' Requires pre built images (-x)'
...@@ -129,7 +132,7 @@ usage() { ...@@ -129,7 +132,7 @@ usage() {
orig_argv=("$@") orig_argv=("$@")
opts='p:a:b:r:t:k:i:g:cfzxmvqh' opts='p:a:b:r:t:k:i:g:d:cfzxmvqh'
while getopts "${opts}" arg; do while getopts "${opts}" arg; do
case "${arg}" in case "${arg}" in
...@@ -137,6 +140,7 @@ while getopts "${opts}" arg; do ...@@ -137,6 +140,7 @@ while getopts "${opts}" arg; do
b) target_branch="$OPTARG" ;; b) target_branch="$OPTARG" ;;
c) clean_first=false ;; c) clean_first=false ;;
f) full_iso=true ;; f) full_iso=true ;;
d) iso_compression="$OPTARG" ;;
g) gpgkey="$OPTARG" ;; g) gpgkey="$OPTARG" ;;
k) kernel="$OPTARG" ;; k) kernel="$OPTARG" ;;
m) persist=true ;; m) persist=true ;;
......
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
# the branding; default: auto # the branding; default: auto
# dist_branding="MJRO" # dist_branding="MJRO"
# compression used, possible values xz (default, best compression), gzip, lzma, lzo, lz4
# lz4 is faster but worst compression, may be useful for locally testing isos
# iso_compression=lz4
# unset defaults to given value # unset defaults to given value
# kernel="linux414" # kernel="linux414"
......
...@@ -137,12 +137,14 @@ make_sfs() { ...@@ -137,12 +137,14 @@ make_sfs() {
mksfs_args+=(${sfs} -noappend) mksfs_args+=(${sfs} -noappend)
local highcomp="-b 256K -Xbcj x86" comp='xz' local highcomp="-b 256K -Xbcj x86"
# local comp='xz'
[[ "${iso_compression}" != "xz" ]] && highcomp=""
if [[ "${name}" == "mhwdfs" && ${used_kernel} < "4" ]]; then if [[ "${name}" == "mhwdfs" && ${used_kernel} < "4" ]]; then
mksfs_args+=(-comp lz4) mksfs_args+=(-comp lz4)
else else
mksfs_args+=(-comp ${comp} ${highcomp}) mksfs_args+=(-comp ${iso_compression} ${highcomp})
fi fi
if ${verbose}; then if ${verbose}; then
mksquashfs "${mksfs_args[@]}" >/dev/null mksquashfs "${mksfs_args[@]}" >/dev/null
......
...@@ -311,6 +311,8 @@ init_buildiso(){ ...@@ -311,6 +311,8 @@ init_buildiso(){
[[ -z ${dist_branding} ]] && dist_branding="MJRO" [[ -z ${dist_branding} ]] && dist_branding="MJRO"
[[ -z ${iso_compression} ]] && iso_compression='xz'
iso_label=$(get_iso_label "${dist_branding}${dist_release//.}") iso_label=$(get_iso_label "${dist_branding}${dist_release//.}")
[[ -z ${kernel} ]] && kernel="linux414" [[ -z ${kernel} ]] && kernel="linux414"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment