ad1c0f86c858022f989a7e72d45aca19ca6cdc0d
[ibg.git] / tools / uninstall-emerald.sh
1 #!/bin/sh
2
3 # This script uninstalls the Emerald CTAN package from $TEXMFLOCAL.
4 # It may be executed anywhere.
5
6 # Created by David Griffith <dave@661.org>
7 # Released into the public domain 2016
8
9 echo "Emerald CTAN package uninstaller..."
10
11 if [ `ps -o uid= $$` -ne 0 ] ; then
12         echo "This script must be run as root"
13         exit 1
14 fi
15
16 TEXMFLOCAL=`kpsewhich -var-value TEXMFLOCAL`
17
18 echo "Deleting emerald from $TEXMFLOCAL..."
19
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
26
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
51
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
56 fi
57
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 \
65                                 $TEXMFLOCAL/fonts \
66                                 $TEXMFLOCAL/tex \
67                                 $TEXMFLOCAL/other \
68                                 $TEXMFLOCAL/web2c/
69
70
71 mktexlsr $TEXMFLOCAL
72 updmap-sys