Only show entries to text for directories that exist; fix number bugs
This commit is contained in:
parent
917ad2ebfe
commit
e3f50e9d1b
2 changed files with 16 additions and 9 deletions
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
LOGDIR="$XDG_CONFIG_HOME"/sxmo/modem
|
||||
trap "gracefulexit" INT TERM
|
||||
|
||||
fatalerr() {
|
||||
|
@ -25,7 +24,7 @@ dialmenu() {
|
|||
)"
|
||||
echo "$NUMBER" | grep "Close Menu" && kill 0
|
||||
|
||||
NUMBER="$(echo "$NUMBER" | cut -d: -f1 tr -d '- ')"
|
||||
NUMBER="$(echo "$NUMBER" | cut -d: -f1 | tr -d -- '- ')"
|
||||
echo "$NUMBER" | grep -qE '^[+0-9]+$' || fatalerr "$NUMBER is not a number"
|
||||
|
||||
echo "Attempting to dial: $NUMBER" >&2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue