Prevent stderr that DRAFT_FILE could not be found.
DRAFT_DIR is also used in the main loop so this prevent logging to sterr ls: cannot access '/home/foobar/.config/sxmo/modem/draft': No such file or directory Signed-off-by: Reed Wade <reedwade@misterbanal.net> Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
parent
0ae9825752
commit
f539e45459
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,6 @@ sendtextmenu() {
|
|||
draft() {
|
||||
NUMBER="$1"
|
||||
TEXT="$2"
|
||||
mkdir -p "$DRAFT_DIR"
|
||||
DRAFT_FILE="$NUMBER-$(date +'%Y-%m-%d_%H-%m-%S')"
|
||||
echo "$NUMBER" > "$DRAFT_DIR/$DRAFT_FILE"
|
||||
echo "$TEXT" >> "$DRAFT_DIR/$DRAFT_FILE"
|
||||
|
@ -111,6 +110,7 @@ tailtextlog() {
|
|||
}
|
||||
|
||||
main() {
|
||||
[ ! -d "$DRAFT_DIR" ] && mkdir -p "$DRAFT_DIR"
|
||||
# E.g. only display logfiles for directories that exist and join w contact name
|
||||
ENTRIES="$(
|
||||
printf %b "Close Menu\nSend a Text$( [ "$(ls -A "$DRAFT_DIR")" ] && printf %b "\nSend a Draft Text")\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue