@@ -156,7 +156,7 @@ unset OPT OPTS OPTL ARGUMENT
156156while true ; do
157157 case " ${1} " in
158158 -a)
159- share_options+=( ${2} )
159+ IFS= " " read -r -a share_options <<< " ${2}"
160160 shift 2
161161 ;;
162162 -c)
@@ -172,7 +172,7 @@ while true; do
172172 shift 1
173173 ;;
174174 -m)
175- architectures=( ${2} )
175+ IFS= " " read -r -a architectures <<< " ${2}"
176176 shift 2
177177 ;;
178178 -o)
@@ -200,7 +200,7 @@ while true; do
200200 share_options+=(" --tarball" )
201201 ;;
202202 -l)
203- locale_list=( ${2} )
203+ IFS= " " read -r -a locale_list <<< " ${2}"
204204 shift 2
205205 ;;
206206 -w)
@@ -238,7 +238,7 @@ if [[ "${all_channel}" = true ]]; then
238238 if [[ -n " ${* } " ]]; then
239239 msg_error " Do not specify the channel." " 1"
240240 else
241- channels=( $( " ${script_path} /tools/channel.sh" -b show) )
241+ readarray -t channels < <( " ${script_path} /tools/channel.sh" -b show)
242242 fi
243243elif [[ -n " ${* } " ]]; then
244244 channels=(" ${@ } " )
@@ -267,7 +267,7 @@ mkdir -p "${fullbuild_dir}"
267267
268268if [[ " $( find " ${fullbuild_dir} " -maxdepth 1 -mindepth 1 -name " fullbuild.*" 2> /dev/null) " ]]; then
269269 msg_info " Do you want to reset lock files ? (y/N)"
270- read -n 1 _yes_or_no
270+ read -r - n 1 _yes_or_no
271271 echo
272272 if [[ " ${_yes_or_no} " = " y" ]] || [[ " ${_yes_or_no} " = " Y" ]]; then
273273 find " ${fullbuild_dir} " -maxdepth 1 -mindepth 1 -name " fullbuild.*" -delete 2> /dev/null
@@ -279,7 +279,7 @@ share_options+=("--work" "${work_dir}")
279279msg_info " Options: ${share_options[*]} "
280280if [[ " ${noconfirm} " = false ]]; then
281281 msg_info " Press Enter to continue or Ctrl + C to cancel."
282- read
282+ read -r
283283fi
284284
285285
@@ -289,7 +289,7 @@ for arch in "${architectures[@]}"; do
289289 for cha in " ${channels[@]} " ; do
290290 for lang in " ${locale_list[@]} " ; do
291291 for retry_count in $( seq 1 " ${retry} " ) ; do
292- if [[ -n " $( cat " ${script_path} /channels/${cha} /architecture" | grep -h -v ^ ' # ' | grep - x " ${arch} " ) " ]] ; then
292+ if grep -h -v ^ ' # ' " ${script_path} /channels/${cha} /architecture" | grep -x " ${arch} " 1> /dev/null 2>&1 ; then
293293 build
294294 fi
295295 done
0 commit comments