File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -101,10 +101,10 @@ get() {
101101 local _kernel _count=0
102102 for _kernel in " ${_kernel_name_list[@]} " ; do
103103 _count=$(( _count + 1 ))
104- [[ " ${_kernel} " = " ${1} " ]] && echo " ${_count} "
104+ [[ " ${_kernel} " = " ${1} " ]] && echo " ${_count} " && return 0
105105 done
106106 echo -n " failed"
107- return 0
107+ return 1
108108 }
109109 _kernel_line=" $( _get_kernel_line " ${1} " ) "
110110
@@ -118,7 +118,7 @@ get() {
118118 fi
119119
120120 # カーネル設定ファイルから該当の行を抽出
121- readarray -t _kernel_config_line < <( grep -h -v ^' #' " ${_kernel_config_file} " | grep -v ^$ | head -n " ${_kernel_line} " | tail -n 1)
121+ readarray -t _kernel_config_line < <( grep -h -v ^' #' " ${_kernel_config_file} " | grep -v ^$ | head -n " ${_kernel_line} " | tail -n 1 | sed -e ' s/ */ /g ' | tr " " " \n " )
122122
123123 # 抽出された行に書かれた設定をそれぞれの変数に代入
124124 # ここで定義された変数のみがグローバル変数
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ get() {
106106 fi
107107
108108 # ロケール設定ファイルから該当の行を抽出
109- readarray -t _locale_config_line < <( grep -h -v ^' #' " ${_locale_config_file} " | grep -v ^$ | head -n " ${_locale_line_number} " | tail -n 1)
109+ readarray -t _locale_config_line < <( grep -h -v ^' #' " ${_locale_config_file} " | grep -v ^$ | head -n " ${_locale_line_number} " | tail -n 1 | tail -n 1 | sed -e ' s/ */ /g ' | tr " " " \n " )
110110
111111 # 抽出された行に書かれた設定をそれぞれの変数に代入
112112 # ここで定義された変数のみがグローバル変数
You can’t perform that action at this time.
0 commit comments