瀏覽代碼

Add an osx notify script.

cray
Mitch Tishmack 11 年之前
父節點
當前提交
fc4b234d46
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. +14
    -0
      common/bin/notify

+ 14
- 0
common/bin/notify 查看文件

@@ -0,0 +1,14 @@
#!/bin/sh
message=${1:="no message"}
title=''
if [ "${2}" != "" ]; then
message="${2}"
title="${1}"
fi
notification="display notification \"${message}\""
#if [ "${title}" != "" ]; then
# notification="${notification} with title \"${title}\""
#fi
[ "${title}" != "" ] && notification="${notification} with title \"${title}\""

osascript -e "${notification}"

Loading…
取消
儲存