home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- # Known browser binary paths
- ieProc='Contents/MacOS/Internet Explorer'
- caminoProc='Contents/MacOS/Camino'
- mozillaProc='Contents/MacOS/mozilla-bin'
- firefoxProc='Contents/MacOS/firefox-bin'
- operaProc='Contents/MacOS/Opera'
- safariProc='Contents/MacOS/Safari'
-
- rm -f ~/PSResult
- rm -f ~/BrowserProcessFound
-
- ps ax -ww -o command > ~/PSResult
-
- # Detect the browser binary paths in the processes
- if grep "${ieProc}" ~/PSResult ; then
- echo "${ieProc}" > ~/BrowserProcessFound
- elif grep "${caminoProc}" ~/PSResult ; then
- echo "${caminoProc}" > ~/BrowserProcessFound
- elif grep "${mozillaProc}" ~/PSResult ; then
- echo "${mozillaProc}" > ~/BrowserProcessFound
- elif grep "${firefoxProc}" ~/PSResult ; then
- echo "${firefoxProc}" > ~/BrowserProcessFound
- elif grep "${operaProc}" ~/PSResult ; then
- echo "${operaProc}" > ~/BrowserProcessFound
- elif grep "${safariProc}" ~/PSResult ; then
- echo "${safariProc}" > ~/BrowserProcessFound
- fi
-
- rm -f ~/PSResult
-
-
-