summaryrefslogtreecommitdiffstats
path: root/testing/source/pkgtools/scripts/setup.htmlview
blob: 980391003135bc493058d4290f6f5569d8676101 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
#BLURB="Set a default browser link."
# Sorry, this is not a full menu, and may not ever be.
# It is trivial to find the htmllink symbolic link and
# point it at the browser that you like. Besides,
# this is not a Linux standard that could be locating
# in any official document. It seems to have been
# started without any consultation with other
# distributions by <take a wild guess>, and now things
# expect it to be there.
#
#
# Note 1. Listing a browser doesn't mean we ship it.
# Note 2. Complaints about our preferences or missing
#         browsers in the list will be considered.
#         Yell at Pat about it. ;-)

# There must be no link, or we assume the admin set it and
# do nothing. Can you tell this Q+D script was written for
# the initial installation?

for browser in firefox seamonkey konqueror galeon epiphany links lynx ; do
  if [ ! -e usr/bin/htmlview -a -x usr/bin/$browser ]; then
    cat << EOF > usr/bin/htmlview
#!/bin/sh
exec $browser "\$@"
EOF
  fi
done
if [ -e usr/bin/htmlview ]; then
  chmod 755 usr/bin/htmlview
fi