summaryrefslogtreecommitdiff
blob: 82ae6d0c560117e699c213db79bb5f900b66d881 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

if [ -z "$1" ]
then
  echo "Usage: $0 URL [TAG]"
  echo "  URL: The URL to open"
  echo "  TAG: The anchor at that url"
  exit 1
fi

if [ -z "$2" ]
then
  TAG=''
else
  TAG="#$2"
fi 

if mozilla -remote openFile\(file://$1$TAG\) ; then
    exit 0
else
    mozilla file://$1$TAG
fi 
exit 0