Skip to content

Commit

Permalink
Add expire time validation
Browse files Browse the repository at this point in the history
  • Loading branch information
vlevit committed Apr 18, 2020
1 parent 5818bd0 commit c986c43
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions notify-send.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ while (( $# > 0 )) ; do
;;
-t|--expire-time|--expire-time=*)
[[ "$1" = --expire-time=* ]] && EXPIRE_TIME="${1#*=}" || { shift; EXPIRE_TIME="$1"; }
if ! [[ "$EXPIRE_TIME" =~ ^-?[0-9]+$ ]]; then
echo "Invalid expire time: ${EXPIRE_TIME}"
exit 1;
fi
;;
-f|--force-expire)
FORCE_EXPIRE=yes
Expand Down

0 comments on commit c986c43

Please sign in to comment.