postinst is in fortunes-fr 0.65+nmu2.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | #!/bin/bash
# postinst script for fortunes-fr
set -e
. /usr/share/debconf/confmodule
db_version 2.0
case "$1" in
configure)
FORTUNES_NAMES=("BD" \
"Cinema" \
"Droit" \
"Haiku" \
"Humoristes" \
"Humour" \
"Informatique" \
"Litterature francaise" \
"Litterature etrangere" \
"Mysoginie" \
"Personnalites" \
"Philosophie" \
"Politique" \
"Proverbes" \
"Religion" \
"Sciences" \
"Guide du Cabaliste Usenet" \
"Guide du Debianiste Pervers" \
"Guide du Fmblien Assassin" \
"Guide du Linuxien Pervers" \
"Guide du Petit Joueur" \
"Maurice et Patapon" \
"Oulipo" \
"Les fortunes de Multidesk OS" \
"Les fortunes de Multidesk OS (2)" \
"La tribune libre de linuxfr" \
"#linuxfr@Undernet" \
"Les bonnes fortunes de J.R.R. Tolkien" \
"fr.rec.photo" \
"#debian-fr@freenode" )
FORTUNES_FILES=("bd" \
"cinema" \
"droit" \
"haiku" \
"humoristes" \
"humour" \
"informatique" \
"litterature_francaise" \
"litterature_etrangere" \
"mysoginie" \
"personnalites" \
"philosophie" \
"politique" \
"proverbes" \
"religion" \
"sciences" \
"gcu" \
"GDP" \
"gfa" \
"glp" \
"gpj" \
"mauriceetpatapon" \
"oulipo" \
"multidesk" \
"multidesk2" \
"tribune-linuxfr" \
"linuxfr-undernet" \
"tolkien_fr" \
"fr.rec.photo" \
"debian-fr" )
unset RET
db_get fortunes-fr/fortunes_to_install
i=0
while [ -n "${FORTUNES_NAMES[$i]}" ] ; do
if echo "$RET" | grep -q "\(^\| \)${FORTUNES_NAMES[$i]}\(,\|$\)" ; then
ln -sf /usr/share/games/fortunes-fr/${FORTUNES_FILES[$i]}.dat /usr/share/games/fortunes/fr/${FORTUNES_FILES[$i]}.dat
else
rm -f /usr/share/games/fortunes/fr/${FORTUNES_FILES[$i]}.dat
fi
i=$((i + 1))
done
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
exit 0
|