Skip to content

Instantly share code, notes, and snippets.

@tjluoma
Forked from anonymous/m2db-notify.sh
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjluoma/d6ca0032eec81b289a40 to your computer and use it in GitHub Desktop.
Save tjluoma/d6ca0032eec81b289a40 to your computer and use it in GitHub Desktop.
"Move To Dropbox" Notifier. Intended to be used as part of a Service for OS X
FILES="$@"
FILES=`echo "${FILES}" | sed "s#${HOME}/Dropbox/##g"`
COUNT="$#"
if [ "${COUNT}" = "1" ]
then
/usr/local/bin/growlnotify \
--appIcon "Dropbox" \
--identifier "MoveToDropbox" \
--message "${FILES}" \
--title "One File Moved to Dropbox"
else
/usr/local/bin/growlnotify \
--appIcon "Dropbox" \
--identifier "MoveToDropbox" \
--message "${FILES}" \
--title "${COUNT} Files Moved to Dropbox"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment