summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2015-02-20 18:13:48 +0100
committerRasmus Steinke <rasi@xssn.at>2015-02-20 18:13:48 +0100
commitf5600bb8d13e5faa969bb516873e1d9b293fba69 (patch)
tree5078ed9e04ba59fbe432b3944fd9b7f18c4409d7
parent4b62194c23e1698a6dc0bca7cc7325ea7855e583 (diff)
parent4903782871acdc31b6a519e02d29705ab1701f48 (diff)
downloadperl-app-clerk-f5600bb8d13e5faa969bb516873e1d9b293fba69.tar.gz
perl-app-clerk-f5600bb8d13e5faa969bb516873e1d9b293fba69.tar.xz
Merge pull request #3 from rafi/feature/notify
detect notify by command, not os
-rwxr-xr-xclerk_updater6
1 files changed, 3 insertions, 3 deletions
diff --git a/clerk_updater b/clerk_updater
index 96af5f6..425cb05 100755
--- a/clerk_updater
+++ b/clerk_updater
@@ -8,10 +8,10 @@ sed=$([[ "$OSTYPE" == "darwin"* ]] && echo 'gsed' || echo 'sed')
notify()
{
- if [[ "$OSTYPE" == "darwin"* ]]; then
- say "Updating clerk caches"
- else
+ if hash notify-send 2>/dev/null; then
notify-send "clerk" "Creating caches"
+ elif hash say 2>/dev/null; then
+ say "Updating clerk caches"
fi
}