3 # This script uninstalls the Emerald CTAN package from $TEXMFLOCAL.
4 # It may be executed anywhere.
6 # Created by David Griffith <dave@661.org>
7 # Released into the public domain 2016
9 echo "Emerald CTAN package uninstaller..."
11 if [ `ps -o uid= $$` -ne 0 ] ; then
12 echo "This script must be run as root"
16 TEXMFLOCAL=`kpsewhich -var-value TEXMFLOCAL`
18 echo "Deleting emerald from $TEXMFLOCAL..."
20 rm -f $TEXMFLOCAL/fonts/map/dvips/emerald.map
21 rm -rf $TEXMFLOCAL/fonts/afm/emerald
22 rm -rf $TEXMFLOCAL/fonts/tfm/emerald
23 rm -rf $TEXMFLOCAL/fonts/type1/emerald
24 rm -rf $TEXMFLOCAL/fonts/vf/emerald
25 rm -rf $TEXMFLOCAL/tex/latex/emerald
27 rm -f $TEXMFLOCAL/other/apicture.ttf \
28 $TEXMFLOCAL/other/AUGIE___.INF \
29 $TEXMFLOCAL/other/DECAC___.INF \
30 $TEXMFLOCAL/other/DECADENC.INF \
31 $TEXMFLOCAL/other/DECAIAL_.INF \
32 $TEXMFLOCAL/other/DECAI___.INF \
33 $TEXMFLOCAL/other/DECAIM__.INF \
34 $TEXMFLOCAL/other/DECAITD_.INF \
35 $TEXMFLOCAL/other/DECAWTD_.INF \
36 $TEXMFLOCAL/other/INTID___.INF \
37 $TEXMFLOCAL/other/INTIMACY.INF \
38 $TEXMFLOCAL/other/J.D.____.INF \
39 $TEXMFLOCAL/other/movieola.inf \
40 $TEXMFLOCAL/other/moviettt.inf \
41 $TEXMFLOCAL/other/POOKIE__.INF \
42 $TEXMFLOCAL/other/SKEETCH_.TTF \
43 $TEXMFLOCAL/other/SPANBBI_.INF \
44 $TEXMFLOCAL/other/SPANBB__.INF \
45 $TEXMFLOCAL/other/SPANBI__.INF \
46 $TEXMFLOCAL/other/SPANB___.INF \
47 $TEXMFLOCAL/other/Syriac__.inf \
48 $TEXMFLOCAL/other/Tallpaul.inf \
49 $TEXMFLOCAL/other/TEENSPIR.TTF \
50 $TEXMFLOCAL/other/WEBSTER_.INF
52 sed -i s/Map\ emerald.map//g $TEXMFLOCAL/web2c/updmap.cfg
53 sed -i '/^$/d' $TEXMFLOCAL/web2c/updmap.cfg
54 if [ ! -s $TEXMFLOCAL/web2c/updmap.cfg ] ; then
55 rm $TEXMFLOCAL/web2c/updmap.cfg
58 rmdir --ignore-fail-on-non-empty $TEXMFLOCAL/fonts/map/dvips \
59 $TEXMFLOCAL/fonts/afm \
60 $TEXMFLOCAL/fonts/map \
61 $TEXMFLOCAL/fonts/tfm \
62 $TEXMFLOCAL/fonts/type1 \
63 $TEXMFLOCAL/fonts/vf \
64 $TEXMFLOCAL/tex/latex \