I found a linux script for a dialog alert, but not one for OSX, so here is my modified script for OSX.
#!/bin/bash
eval $@
if [[ $? -eq 0 ]]; then
osascript -e 'tell application "Finder"' -e "activate" -e "display dialog \"Command '$@' in $PWD completed.\"" -e 'end tell';
else
osascript -e 'tell application "Finder"' -e "activate" -e "display dialog \"Command '$@' in $PWD failed! $@\"" -e 'end tell';
fi
2 comments:
Another option depending on whether you leave your volume up or not is to replace the dialog popup with "say 'victory is mine'" and "say 'nothing good came of that rado'". For some reason, I find that equally useful for long running scripts but less annoying than the modal dialog.
Nice Devin, I'll have to try it out.
Post a Comment