aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-03-28 17:20:20 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2024-03-28 17:20:20 +0100
commit5ae4e1ed091fc9dfb8a140f23788c7844385aeac (patch)
treea44f62b72f02b194cc1b927d34ca0885b069f7bd
parentb3a0caa1094120a231f110c9fce53b6fb51d3a76 (diff)
downloadscripts-5ae4e1ed091fc9dfb8a140f23788c7844385aeac.tar.gz
scripts-5ae4e1ed091fc9dfb8a140f23788c7844385aeac.zip
Avoid exiting repl alg on error
-rwxr-xr-xalg4
1 files changed, 2 insertions, 2 deletions
diff --git a/alg b/alg
index e3a53a9..6784cf6 100755
--- a/alg
+++ b/alg
@@ -158,7 +158,7 @@ run() {
158 letter1="$(echo "$letters" | cut -c 1)" 158 letter1="$(echo "$letters" | cut -c 1)"
159 letter2="$(echo "$letters" | cut -b 2)" 159 letter2="$(echo "$letters" | cut -b 2)"
160 160
161 [ -z "$letter1" ] && usage && exit 1 161 [ -z "$letter1" ] && usage && return
162 162
163 case "$type" in 163 case "$type" in
164 c) 164 c)
@@ -184,7 +184,7 @@ run() {
184 fi 184 fi
185 ;; 185 ;;
186 *) 186 *)
187 usage && exit 1 187 usage && return
188 ;; 188 ;;
189 esac 189 esac
190} 190}

Generated with cgit - Back to sebastiano.tronto.net