Skip to content

Commit 80a2ad9

Browse files
committed
[fix] : Fixed SC2162
1 parent c596e44 commit 80a2ad9

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

tools/wizard.sh

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Function_Global_Main_wizard_language () {
129129
echo "2: 日本語 Japanese"
130130
echo
131131
echo -n ": "
132-
read Var_Global_Wizard_Option_language
132+
read -r Var_Global_Wizard_Option_language
133133

134134
case "${Var_Global_Wizard_Option_language}" in
135135
1 ) Var_Global_Wizard_Option_language=en ;;
@@ -238,7 +238,7 @@ Function_Global_Main_guide_to_the_web () {
238238
Function_Global_Main_run_keyring.sh () {
239239
local Var_Local_input_yes_or_no
240240
msg_n "Alter Linuxの鍵を追加しますか?(y/N): " "Are you sure you want to add the Alter Linux key? (y/N):"
241-
read Var_Local_input_yes_or_no
241+
read -r Var_Local_input_yes_or_no
242242
if ${Var_Global_Wizard_Option_nobuild}; then
243243
msg \
244244
"${Var_Local_input_yes_or_no}が入力されました。シミュレーションモードが有効化されているためスキップします。" \
@@ -272,7 +272,7 @@ Function_Global_Ask_build_arch() {
272272
echo "2: i686 (32bit)"
273273
echo -n ": "
274274

275-
read Var_Global_Wizard_Option_build_arch
275+
read -r Var_Global_Wizard_Option_build_arch
276276

277277
case "${Var_Global_Wizard_Option_build_arch}" in
278278
1 | "x86_64" ) Var_Global_Wizard_Option_build_arch="x86_64" ;;
@@ -285,7 +285,7 @@ Function_Global_Ask_build_arch() {
285285
Function_Global_Ask_plymouth () {
286286
local Var_Local_input_yes_or_no
287287
msg_n "Plymouthを有効化しますか?[no](y/N) : " "Do you want to enable Plymouth? [no] (y/N) : "
288-
read Var_Local_input_yes_or_no
288+
read -r Var_Local_input_yes_or_no
289289
case "${Var_Local_input_yes_or_no}" in
290290
"y" | "Y" | "yes" | "Yes" | "YES" ) Var_Global_Build_plymouth=true ;;
291291
"n" | "N" | "no" | "No" | "NO" ) Var_Global_Build_plymouth=false ;;
@@ -297,7 +297,7 @@ Function_Global_Ask_plymouth () {
297297
Function_Global_Ask_japanese () {
298298
local Var_Local_input_yes_or_no
299299
msg_n "日本語を有効化しますか?[no](y/N) : " "Do you want to activate Japanese? [no] (y/N) : "
300-
read Var_Local_input_yes_or_no
300+
read -r Var_Local_input_yes_or_no
301301
case "${Var_Local_input_yes_or_no}" in
302302
"y" | "Y" | "yes" | "Yes" | "YES" ) Var_Global_Build_japanese=true ;;
303303
"n" | "N" | "no" | "No" | "NO" ) Var_Global_Build_japanese=false ;;
@@ -324,7 +324,7 @@ Function_Global_Ask_locale() {
324324
Var_Local_count=$(( Var_Local_count + 1 ))
325325
done
326326
echo -n ": "
327-
read Var_Local_input_locale
327+
read -r Var_Local_input_locale
328328

329329
set +e
330330
expr "${Var_Local_input_locale}" + 1 >/dev/null 2>&1
@@ -366,7 +366,7 @@ Function_Global_Ask_comp_type () {
366366
echo "5: xz"
367367
echo "6: zstd"
368368
echo -n ": "
369-
read Var_Local_input_comp_type
369+
read -r Var_Local_input_comp_type
370370
case "${Var_Local_input_comp_type}" in
371371
"1" | "gzip" ) Var_Global_Build_comp_type="gzip" ;;
372372
"2" | "lzma" ) Var_Global_Build_comp_type="lzma" ;;
@@ -391,7 +391,7 @@ Function_Global_Ask_comp_option () {
391391

392392
Function_Local_gzip_level () {
393393
msg_n "gzipの圧縮レベルを入力してください。 (1~22) : " "Enter the gzip compression level. (1~22) : "
394-
read Var_Local_gzip_level
394+
read -r Var_Local_gzip_level
395395
if ! [[ ${Var_Local_gzip_level} -lt 23 && ${Var_Local_gzip_level} -ge 1 ]]; then
396396
Function_Local_gzip_level
397397
return 0
@@ -402,7 +402,7 @@ Function_Global_Ask_comp_option () {
402402
"gzipのウィンドウサイズを入力してください。 (1~15) : " \
403403
"Please enter the gzip window size. (1~15) : "
404404

405-
read Var_Local_gzip_window
405+
read -r Var_Local_gzip_window
406406
if ! [[ ${Var_Local_gzip_window} -lt 15 && ${Var_Local_gzip_window} -ge 1 ]]; then
407407
Function_Local_gzip_window
408408
return 0
@@ -419,7 +419,7 @@ Function_Global_Ask_comp_option () {
419419
msg_n \
420420
"高圧縮モードを有効化しますか? (y/N) : " \
421421
"Do you want to enable high compression mode? (y/N) : "
422-
read Var_Local_lz4_high_comp
422+
read -r Var_Local_lz4_high_comp
423423
case "${Var_Local_lz4_high_comp}" in
424424
"y" | "Y" | "yes" | "Yes" | "YES" ) comp_option="-Xhc" ;;
425425
"n" | "N" | "no" | "No" | "NO" ) : ;;
@@ -433,7 +433,7 @@ Function_Global_Ask_comp_option () {
433433
msg_n \
434434
"zstdの圧縮レベルを入力してください。 (1~22) : " \
435435
"Enter the zstd compression level. (1~22) : "
436-
read Var_Local_zstd_level
436+
read -r Var_Local_zstd_level
437437
if [[ ${Var_Local_zstd_level} -lt 23 && ${Var_Local_zstd_level} -ge 1 ]]; then
438438
comp_option="-Xcompression-level ${Var_Local_zstd_level}"
439439
else
@@ -458,7 +458,7 @@ Function_Global_Ask_comp_option () {
458458
echo "4: lzo1x_1_15"
459459
echo "5: lzo1x_999"
460460
echo -n ": "
461-
read Var_Local_lzo_algorithm
461+
read -r Var_Local_lzo_algorithm
462462
case "${Var_Local_lzo_algorithm}" in
463463
"1" | "lzo1x_1")
464464
Var_Local_lzo_algorithm="lzo1x_1"
@@ -486,7 +486,7 @@ Function_Global_Ask_comp_option () {
486486
local Function_Local_lzo_level Var_Local_lzo_level
487487
Function_Local_lzo_level () {
488488
msg_n "lzoの圧縮レベルを入力してください。 (1~9) : " "Enter the gzip compression level. (1~9) : "
489-
read Var_Local_lzo_level
489+
read -r Var_Local_lzo_level
490490
if ! [[ ${Var_Local_lzo_level} -lt 10 && ${Var_Local_lzo_level} -ge 1 ]]; then
491491
Function_Local_lzo_level
492492
return 0
@@ -519,7 +519,7 @@ Function_Global_Ask_comp_option () {
519519

520520
Function_Global_Ask_username () {
521521
msg_n "ユーザー名を入力してください : " "Please enter your username : "
522-
read Var_Global_Build_username
522+
read -r Var_Global_Build_username
523523
if [[ -z "${Var_Global_Build_username}" ]]; then
524524
Function_Global_Ask_username
525525
return 0
@@ -532,10 +532,10 @@ Function_Global_Ask_password () {
532532
local Var_Local_password Var_Local_password_confirm
533533

534534
msg_n "パスワードを入力してください : " "Please enter your password : "
535-
read -s Var_Local_password
535+
read -r -s Var_Local_password
536536
echo
537537
msg_n "もう一度入力して下さい : " "Type it again : "
538-
read -s Var_Local_password_confirm
538+
read -r -s Var_Local_password_confirm
539539
if [[ ! "${Var_Local_password}" = "${Var_Local_password_confirm}" ]]; then
540540
echo
541541
msg_error "同じパスワードが入力されませんでした。" "You did not enter the same password."
@@ -576,7 +576,7 @@ Function_Global_Ask_kernel () {
576576
# 質問する
577577
echo -n ": "
578578
local Var_Local_input_kernel
579-
read Var_Local_input_kernel
579+
read -r Var_Local_input_kernel
580580

581581
# 回答を解析する
582582
# 数字かどうか判定する
@@ -632,7 +632,7 @@ Function_Global_Ask_channel () {
632632
Var_Local_count="$(( Var_Local_count + 1 ))"
633633
done
634634
echo -n ":"
635-
read Var_Global_Build_channel
635+
read -r Var_Global_Build_channel
636636

637637
# 入力された値が数字かどうか判定する
638638
set +e
@@ -677,7 +677,7 @@ Function_Global_Ask_owner () {
677677
}
678678

679679
msg_n "イメージファイルの所有者を入力してください。: " "Enter the owner of the image file.: "
680-
read Var_Global_iso_owner
680+
read -r Var_Global_iso_owner
681681
if [[ $(Function_Local_check_user ${Var_Global_iso_owner}) = false ]]; then
682682
echo "ユーザーが存在しません。"
683683
Function_Global_Ask_owner
@@ -698,7 +698,7 @@ Function_Global_Ask_out_dir () {
698698
msg "イメージファイルの作成先を入力して下さい。" "Enter the destination to create the image file."
699699
msg "デフォルトは ${Var_Global_Wizard_Env_script_path}/out です。" "The default is ${Var_Global_Wizard_Env_script_path}/out."
700700
echo -n ": "
701-
read out_dir
701+
read -r out_dir
702702
if [[ -z "${out_dir}" ]]; then
703703
out_dir="${Var_Global_Wizard_Env_script_path}/out"
704704
else
@@ -727,7 +727,7 @@ Function_Global_Ask_out_dir () {
727727
Function_Global_Ask_tarball () {
728728
local Var_Local_input_yes_or_no
729729
msg_n "tarballをビルドしますか?[no](y/N) : " "Build a tarball? [no] (y/N) : "
730-
read Var_Local_input_yes_or_no
730+
read -r Var_Local_input_yes_or_no
731731
case "${Var_Local_input_yes_or_no}" in
732732
"y" | "Y" | "yes" | "Yes" | "YES" ) Var_Global_Build_tarball=true ;;
733733
"n" | "N" | "no" | "No" | "NO" ) Var_Global_Build_tarball=false ;;
@@ -776,7 +776,7 @@ Function_Global_Ask_Confirm () {
776776
"この設定で続行します。よろしいですか? (y/N) : " \
777777
"Continue with this setting. Is it OK? (y/N) : "
778778
local Var_Local_input_yes_or_no
779-
read Var_Local_input_yes_or_no
779+
read -r Var_Local_input_yes_or_no
780780
case "${Var_Local_input_yes_or_no}" in
781781
"y" | "Y" | "yes" | "Yes" | "YES" ) : ;;
782782
"n" | "N" | "no" | "No" | "NO" ) ask ;;

0 commit comments

Comments
 (0)