Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (34 sloc) 910 Bytes
OLDDOCDIR=/usr/share/doc/ghc/html/libraries
DOCDIR=/usr/share/doc/ghc-8.0.2/html/libraries
clean_docs() {
( cd ${1} ;
rm -f doc-index*.html frames.html index-frames.html index.html \
ocean.css haddock-util.js \
hslogo-16.png minus.gif plus.gif synopsis.png
)
}
pre_install() {
true
}
post_install() {
true
}
pre_upgrade() {
echo '==> Unregistering cabalized packages...'
[[ -d /usr/share/haskell ]] && find /usr/share/haskell -maxdepth 2 -name 'unregister.sh' -exec {} \;
echo '==> Done.'
[[ -d ${OLDDOCDIR} ]] && clean_docs ${OLDDOCDIR}
}
post_upgrade() {
echo '==> All cabalized packages need to be reinstalled now.'
echo '==> See /usr/share/haskell/ and ghc-pkg list --user for a tentative list of affected packages.'
}
pre_remove() {
clean_docs ${DOCDIR}
}
post_remove () {
true
}
# Local Variables:
# mode: shell-script
# End: