#!/bin/sh

if [ $# -eq 2 ] ; then
    notify-send "${1}" "${2}" 
    if [ ! -z $TM_USERNAME ] ; then
        tm send --text="${1}: ${2}" --phones=$NOTIFICATION_PHNUM > /dev/null
    fi
else
    notify-send "${1}"
    if [ ! -z $TM_USERNAME ] ; then
        tm send --text="${1}" --phones=$NOTIFICATION_PHNUM > /dev/null
    fi
fi
