OSDN Git Service

[fix] : Fixed cat error
authorhayao <shun819.mail@gmail.com>
Sun, 12 Jul 2020 06:27:01 +0000 (15:27 +0900)
committerhayao <shun819.mail@gmail.com>
Sun, 12 Jul 2020 06:27:01 +0000 (15:27 +0900)
build.sh

index c90d4fc..e415017 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -282,7 +282,7 @@ _usage () {
     for i in $(ls -l "${script_path}"/channels/ | awk '$1 ~ /d/ {print $9}'); do
         if [[ -n $(ls "${script_path}"/channels/${i}) ]]; then
             if [[ ! ${i} = "share" ]]; then
-                if [[ "$(cat "${script_path}/channels/${i}/alteriso")" = "alteriso=3" ]]; then
+                if [[ "$(cat "${script_path}/channels/${i}/alteriso" 2> /dev/null)" = "alteriso=3" ]]; then
                     if [[ ! $(echo "${i}" | sed 's/^.*\.\([^\.]*\)$/\1/') = "add" ]]; then
                         if [[ ! -d "${script_path}/channels/${i}.add" ]]; then
                             channel_list="${channel_list[@]} ${i}"
@@ -1514,7 +1514,7 @@ if [[ -n "${1}" ]]; then
         for i in $(ls -l "${script_path}"/channels/ | awk '$1 ~ /d/ {print $9 }'); do
             if [[ -n $(ls "${script_path}"/channels/${i}) ]]; then
                 if [[ ! ${i} = "share" ]]; then
-                    if [[ "$(cat "${script_path}/channels/${i}/alteriso")" = "alteriso=3" ]]; then
+                    if [[ "$(cat "${script_path}/channels/${i}/alteriso" 2> /dev/null)" = "alteriso=3" ]]; then
                         if [[ ! $(echo "${i}" | sed 's/^.*\.\([^\.]*\)$/\1/') = "add" ]]; then
                             if [[ ! -d "${script_path}/channels/${i}.add" ]]; then
                                 channel_list="${channel_list[@]} ${i}"