aboutsummaryrefslogtreecommitdiff
path: root/bin/web
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2010-07-14 11:12:55 -0700
committerRuss Cox <rsc@swtch.com>2010-07-14 11:12:55 -0700
commitf92863adf47cd8426d3c2f62b386f532b5688ca1 (patch)
tree7d5b5a827638bbd59108f89c69eed4d450b35055 /bin/web
parent36d9b90c56e939244b7081b575dc51c2afddff93 (diff)
downloadplan9port-f92863adf47cd8426d3c2f62b386f532b5688ca1.tar.gz
plan9port-f92863adf47cd8426d3c2f62b386f532b5688ca1.tar.bz2
plan9port-f92863adf47cd8426d3c2f62b386f532b5688ca1.zip
web: just use "open" on OS X
R=rsc http://codereview.appspot.com/1764045
Diffstat (limited to 'bin/web')
-rwxr-xr-xbin/web68
1 files changed, 1 insertions, 67 deletions
diff --git a/bin/web b/bin/web
index 5d8785be..e8ea86e7 100755
--- a/bin/web
+++ b/bin/web
@@ -1,74 +1,8 @@
#!/bin/sh
-plumbfirefox()
-{
- echo '
- tell application "Firefox"
- activate
- tell application "System Events"
- tell process "firefox"
- keystroke "t" using {command down}
- end tell
- end tell
- Get URL "'$1'"
- end tell
- ' | osascript
-}
-
-plumbsafari()
-{
- echo '
- tell application "Safari"
- activate
- tell application "System Events"
- tell process "safari"
- keystroke "t" using {command down}
- end tell
- end tell
- open location "'$1'"
- end tell
- ' | osascript
-}
-
-plumbcamino()
-{
- echo '
- tell application "Camino"
- activate
- tell application "System Events"
- tell process "camino"
- keystroke "t" using {command down}
- end tell
- end tell
- Get URL "'$1'"
- end tell
- ' | osascript
-}
-
plumbapple()
{
- case ${BROWSER:-none} in
- firefox)
- plumbfirefox "$@"
- ;;
- safari)
- plumbsafari "$@"
- ;;
- camino)
- plumbcamino "$@"
- ;;
- none)
- if [ -d /Applications/Camino.app ]
- then
- plumbcamino "$@"
- elif [ -d /Applications/Firefox.app ]
- then
- plumbfirefox "$@"
- else
- plumbsafari "$@"
- fi
- ;;
- esac
+ open "$@"
}
plumbunix()