1
2
3
4
5
6
7
8
9
10
APP_PATH=$(ps -xwwp $PPID -o command|grep -o '.*.app')
ORIGIFS="$IFS"
IFS=$'\n\b'
Y_POS=10
for line in $(</tmp/tm_tidy_errors); do
   echo "$Y_POS"
   CocoaDialog bubble --x-placement 10 --y-placement "$Y_POS" --title "Tidy Warning" --text "$line" --icon-file "${APP_PATH}/Contents/Resources/Textmate.icns" &
   Y_POS=$((Y_POS + 100))
done
IFS="$ORIGIFS"