Skip to content

Commit 79b4af4

Browse files
committed
[update] : Supported advanced settings of lzo
1 parent e38661c commit 79b4af4

File tree

1 file changed

+59
-1
lines changed

1 file changed

+59
-1
lines changed

tools/wizard.sh

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,65 @@ Function_Global_Ask_comp_option () {
433433
:
434434
}
435435
;;
436-
"lzo" | "xz")
436+
"lzo")
437+
Function_Local_comp_option () {
438+
local Function_Local_lzo_algorithm Var_Local_lzo_algorithm
439+
Function_Local_lzo_algorithm () {
440+
msg \
441+
"lzoの圧縮アルゴリズムを以下の番号から選択して下さい" \
442+
"Select the lzo compression algorithm from the numbers below"
443+
msg \
444+
"よく理解していない場合はlzo1x_999を選択して下さい" \
445+
"Choose lzo1x_999 if you are not familiar with it"
446+
echo
447+
echo "1: lzo1x_1"
448+
echo "2: lzo1x_1_11"
449+
echo "3: lzo1x_1_12"
450+
echo "4: lzo1x_1_15"
451+
echo "5: lzo1x_999"
452+
echo -n " : "
453+
read Var_Local_lzo_algorithm
454+
case "${Var_Local_lzo_algorithm}" in
455+
"1" | "lzo1x_1")
456+
Var_Local_lzo_algorithm="lzo1x_1"
457+
;;
458+
"2" | "lzo1x_1_11")
459+
Var_Local_lzo_algorithm="lzo1x_1_11"
460+
;;
461+
"3" | "lzo1x_1_12")
462+
Var_Local_lzo_algorithm="lzo1x_1_12"
463+
;;
464+
"4" | "lzo1x_1_15")
465+
Var_Local_lzo_algorithm="lzo1x_1_15"
466+
;;
467+
"5" | "lzo1x_999")
468+
Var_Local_lzo_algorithm="lzo1x_999"
469+
;;
470+
*)
471+
Function_Local_lzo_algorithm
472+
return 0
473+
;;
474+
esac
475+
}
476+
477+
Function_Local_lzo_algorithm
478+
if [[ "${Var_Local_lzo_algorithm}" = "lzo1x_999" ]]; then
479+
local Function_Local_lzo_level Var_Local_lzo_level
480+
Function_Local_lzo_level () {
481+
msg_n "lzoの圧縮レベルを入力してください。 (1~9) : " "Enter the gzip compression level. (1~9) : "
482+
read Var_Local_lzo_level
483+
if ! [[ ${Var_Local_lzo_level} -lt 9 && ${Var_Local_lzo_level} -ge 1 ]]; then
484+
Function_Local_lzo_level
485+
return 0
486+
fi
487+
}
488+
Function_Local_lzo_level
489+
comp_option="-Xalgorithm lzo1x_999 -Xcompression-level ${Var_Local_lzo_level}"
490+
else
491+
comp_option="-Xalgorithm ${Var_Local_lzo_algorithm}"
492+
fi
493+
}
494+
"xz")
437495
Function_Local_comp_option () {
438496
msg_error \
439497
"現在${Var_Global_Build_comp_type}の詳細設定ウィザードがサポートされていません。" \

0 commit comments

Comments
 (0)