From 78a8187255cc95339e0990e3689c207ba008ef46 Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 12 Oct 2020 21:18:42 +0800 Subject: [PATCH] ustb-cli: Disable stderr avoiding alerts of Raspberry Pi --- ustb-cli | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ustb-cli b/ustb-cli index 77cd460..5d3ea39 100755 --- a/ustb-cli +++ b/ustb-cli @@ -1,7 +1,7 @@ #!/bin/bash SCRIPTNAME=${0##*/} -VERSION=v1.1 +VERSION=v1.2 LOGIN_HOST=202.204.48.82 ALWAYS_ATTEMPT_IPV6=1 @@ -298,7 +298,7 @@ _ustb_draw_clock() { padding_y=$((($tty_height - $min_height) / 2)) [ $padding_x -lt 0 ] || [ $padding_y -lt 0 ] && { - echo "Error: Minimum tty size ${min_height}x${min_width} required" >&2 + echo "Error: Minimum tty size ${min_height}x${min_width} required." return 1 } @@ -707,14 +707,14 @@ _ustb_draw_digit_9() { # handle exit trap _ustb_bye 0 +exec 2>&0 -# Run in cli mode if no arguments, +# Run in cli mode if no arguments [ $# -lt 1 ] && { while read -ep "ustb> " line; do _ustb_command $line done -} || { - # or excute single command +} || { # or excute single command _ustb_command $* exit $? }