Skip to content

Commit e9e4979

Browse files
committed
[fix] : Fixed not being able to get the description of additional channels.
1 parent 3935232 commit e9e4979

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

tools/wizard.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -482,20 +482,16 @@ Function_Global_Ask_kernel () {
482482

483483
# チャンネルの指定
484484
Function_Global_Ask_channel () {
485-
local Var_Local_int Var_Local_count Var_Local_channel Var_Local_channel_list Var_Local_description
486-
487-
Var_Local_count=1
488-
489485
# チャンネルの一覧を取得
490-
local Var_Local_int Var_Local_count Var_Local_channel Var_Local_channel_list Var_Local_description
486+
local Var_Local_int Var_Local_count=1 Var_Local_channel Var_Local_channel_list Var_Local_description Var_Local_channel_dir Var_Local_index
491487
Var_Local_channel_list=($("${Var_Global_Wizard_Env_script_path}/tools/channel.sh" --nobuiltin show))
488+
Var_Local_channel_dir=($("${Var_Global_Wizard_Env_script_path}/tools/channel.sh" --dirname --nobuiltin show))
492489

493490
msg "チャンネルを以下の番号から選択してください。" "Select a channel from the numbers below."
494-
495491
# 選択肢を生成
496492
for Var_Local_channel in ${Var_Local_channel_list[@]}; do
497-
if [[ -f "${Var_Global_Wizard_Env_script_path}/channels/${Var_Local_channel}/description.txt" ]]; then
498-
Var_Local_description=$(cat "${Var_Global_Wizard_Env_script_path}/channels/${Var_Local_channel}/description.txt")
493+
if [[ -f "${Var_Global_Wizard_Env_script_path}/channels/${Var_Local_channel_dir[$(( Var_Local_count - 1 ))]}/description.txt" ]]; then
494+
Var_Local_description=$(cat "${Var_Global_Wizard_Env_script_path}/channels/${Var_Local_channel_dir[$(( Var_Local_count - 1 ))]}/description.txt")
499495
else
500496
if [[ "${Var_Global_Wizard_Option_language}" = "jp" ]]; then
501497
Var_Local_description="このチャンネルにはdescription.txtがありません。"

0 commit comments

Comments
 (0)