OSDN Git Service

[update] : No output when the channel list is empty
authorhayao <shun819.mail@gmail.com>
Sat, 3 Oct 2020 06:53:20 +0000 (15:53 +0900)
committerhayao <shun819.mail@gmail.com>
Sat, 3 Oct 2020 06:53:20 +0000 (15:53 +0900)
tools/channel.sh

index 48c887c..b236c4a 100755 (executable)
@@ -93,7 +93,9 @@ check() {
 
 show() {
     gen_channel_list
-    echo "${channellist[*]}"
+    if (( "${#channellist[*]}" > 0)); then
+        echo "${channellist[*]}"
+    fi
 }