| 1 |
#! /bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
priority=1101 |
| 6 |
basedir=/usr/share/icedtea-web |
| 7 |
tools='javaws itweb-settings policyeditor' |
| 8 |
|
| 9 |
case "$1" in |
| 10 |
configure) |
| 11 |
if [ -z "$2" ]; then |
| 12 |
update_alternatives=y |
| 13 |
fi |
| 14 |
if [ -n "$2" ]; then |
| 15 |
for tool in $tools; do |
| 16 |
if [ -z "$(update-alternatives --list $tool 2>/dev/null | grep ^$basedir/)" ]; then |
| 17 |
update_alternatives=y |
| 18 |
break |
| 19 |
fi |
| 20 |
done |
| 21 |
fi |
| 22 |
|
| 23 |
if [ "$update_alternatives" = y ]; then |
| 24 |
if [ -f $basedir/bin/javaws.sh ]; then |
| 25 |
for tool in $tools; do |
| 26 |
unset slave1 || true |
| 27 |
if [ -e $basedir/man/man1/$tool.1.gz ]; then |
| 28 |
slave1="--slave /usr/share/man/man1/$tool.1.gz $tool.1.gz $basedir/man/man1/$tool.1.gz" |
| 29 |
fi |
| 30 |
update-alternatives --install /usr/bin/$tool $tool $basedir/bin/$tool.sh $priority $slave1 |
| 31 |
update-alternatives --set $tool $basedir/bin/$tool.sh |
| 32 |
done |
| 33 |
fi |
| 34 |
fi # update_alternatives |
| 35 |
esac |
| 36 |
|
| 37 |
#DEBHELPER# |