-
Notifications
You must be signed in to change notification settings - Fork 2
/
deinstall.sh
executable file
·241 lines (236 loc) · 8.84 KB
/
deinstall.sh
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
#!/bin/sh
# Generated by niminst
if [ $# -eq 1 ] ; then
case $1 in
"--help"|"-h"|"help"|"h")
echo "Nim deinstallation script"
echo "Usage: [sudo] sh deinstall.sh DIR"
echo "Where DIR may be:"
echo " /usr/bin"
echo " /usr/local/bin"
echo " /opt"
echo " <some other dir> (treated similar '/opt')"
exit 1
;;
"/usr/bin")
bindir=/usr/bin
configdir=/etc/nim
libdir=/usr/lib/nim
docdir=/usr/share/nim/doc
datadir=/usr/share/nim/data
nimbleDir="/opt/nimble/pkgs/nim-2.0.10"
;;
"/usr/local/bin")
bindir=/usr/local/bin
configdir=/etc/nim
libdir=/usr/local/lib/nim
docdir=/usr/local/share/nim/doc
datadir=/usr/local/share/nim/data
nimbleDir="/opt/nimble/pkgs/nim-2.0.10"
;;
"/opt")
bindir="/opt/nim/bin"
configdir="/opt/nim/config"
libdir="/opt/nim/lib"
docdir="/opt/nim/doc"
datadir="/opt/nim/data"
nimbleDir="/opt/nimble/pkgs/nim-2.0.10"
;;
*)
bindir="$1/nim/bin"
configdir="$1/nim/config"
libdir="$1/nim/lib"
docdir="$1/nim/doc"
datadir="$1/nim/data"
nimbleDir="$1/nim"
;;
esac
echo "removing files..."
rm -f $bindir/nim
rm -f $configdir/nim.cfg
rm -f $configdir/nimdoc.cfg
rm -f $configdir/nimdoc.tex.cfg
rm -f $configdir/rename.rules.cfg
rm -f $configdir/config.nims
rm -rf $docdir
rm -rf $datadir
rm -rf $libdir
rm -f $nimbleDir/compiler/aliasanalysis.nim
rm -f $nimbleDir/compiler/aliases.nim
rm -f $nimbleDir/compiler/ast.nim
rm -f $nimbleDir/compiler/astalgo.nim
rm -f $nimbleDir/compiler/astmsgs.nim
rm -f $nimbleDir/compiler/backendpragmas.nim
rm -f $nimbleDir/compiler/bitsets.nim
rm -f $nimbleDir/compiler/btrees.nim
rm -f $nimbleDir/compiler/ccgcalls.nim
rm -f $nimbleDir/compiler/ccgexprs.nim
rm -f $nimbleDir/compiler/ccgliterals.nim
rm -f $nimbleDir/compiler/ccgmerge_unused.nim
rm -f $nimbleDir/compiler/ccgreset.nim
rm -f $nimbleDir/compiler/ccgstmts.nim
rm -f $nimbleDir/compiler/ccgthreadvars.nim
rm -f $nimbleDir/compiler/ccgtrav.nim
rm -f $nimbleDir/compiler/ccgtypes.nim
rm -f $nimbleDir/compiler/ccgutils.nim
rm -f $nimbleDir/compiler/cgen.nim
rm -f $nimbleDir/compiler/cgendata.nim
rm -f $nimbleDir/compiler/cgmeth.nim
rm -f $nimbleDir/compiler/closureiters.nim
rm -f $nimbleDir/compiler/cmdlinehelper.nim
rm -f $nimbleDir/compiler/commands.nim
rm -f $nimbleDir/compiler/compiler.nimble
rm -f $nimbleDir/compiler/concepts.nim
rm -f $nimbleDir/compiler/condsyms.nim
rm -f $nimbleDir/compiler/debuginfo.nim
rm -f $nimbleDir/compiler/debugutils.nim
rm -f $nimbleDir/compiler/depends.nim
rm -f $nimbleDir/compiler/dfa.nim
rm -f $nimbleDir/compiler/docgen.nim
rm -f $nimbleDir/compiler/docgen2.nim
rm -f $nimbleDir/compiler/enumtostr.nim
rm -f $nimbleDir/compiler/errorhandling.nim
rm -f $nimbleDir/compiler/evalffi.nim
rm -f $nimbleDir/compiler/evaltempl.nim
rm -f $nimbleDir/compiler/extccomp.nim
rm -f $nimbleDir/compiler/filter_tmpl.nim
rm -f $nimbleDir/compiler/filters.nim
rm -f $nimbleDir/compiler/gorgeimpl.nim
rm -f $nimbleDir/compiler/guards.nim
rm -f $nimbleDir/compiler/hlo.nim
rm -f $nimbleDir/compiler/ic/replayer.nim
rm -f $nimbleDir/compiler/ic/rodfiles.nim
rm -f $nimbleDir/compiler/ic/ic.nim
rm -f $nimbleDir/compiler/ic/design.rst
rm -f $nimbleDir/compiler/ic/cbackend.nim
rm -f $nimbleDir/compiler/ic/packed_ast.nim
rm -f $nimbleDir/compiler/ic/navigator.nim
rm -f $nimbleDir/compiler/ic/integrity.nim
rm -f $nimbleDir/compiler/ic/dce.nim
rm -f $nimbleDir/compiler/ic/bitabs.nim
rm -f $nimbleDir/compiler/idents.nim
rm -f $nimbleDir/compiler/importer.nim
rm -f $nimbleDir/compiler/index.nim
rm -f $nimbleDir/compiler/injectdestructors.nim
rm -f $nimbleDir/compiler/installer.ini
rm -f $nimbleDir/compiler/int128.nim
rm -f $nimbleDir/compiler/isolation_check.nim
rm -f $nimbleDir/compiler/jsgen.nim
rm -f $nimbleDir/compiler/jstypes.nim
rm -f $nimbleDir/compiler/lambdalifting.nim
rm -f $nimbleDir/compiler/layouter.nim
rm -f $nimbleDir/compiler/lexer.nim
rm -f $nimbleDir/compiler/liftdestructors.nim
rm -f $nimbleDir/compiler/liftlocals.nim
rm -f $nimbleDir/compiler/lineinfos.nim
rm -f $nimbleDir/compiler/linter.nim
rm -f $nimbleDir/compiler/llstream.nim
rm -f $nimbleDir/compiler/lookups.nim
rm -f $nimbleDir/compiler/lowerings.nim
rm -f $nimbleDir/compiler/macrocacheimpl.nim
rm -f $nimbleDir/compiler/magicsys.nim
rm -f $nimbleDir/compiler/main.nim
rm -f $nimbleDir/compiler/mapping.txt
rm -f $nimbleDir/compiler/modulegraphs.nim
rm -f $nimbleDir/compiler/modulepaths.nim
rm -f $nimbleDir/compiler/modules.nim
rm -f $nimbleDir/compiler/msgs.nim
rm -f $nimbleDir/compiler/ndi.nim
rm -f $nimbleDir/compiler/nilcheck.nim
rm -f $nimbleDir/compiler/nim.cfg
rm -f $nimbleDir/compiler/nim.nim
rm -f $nimbleDir/compiler/nimblecmd.nim
rm -f $nimbleDir/compiler/nimconf.nim
rm -f $nimbleDir/compiler/nimeval.nim
rm -f $nimbleDir/compiler/nimlexbase.nim
rm -f $nimbleDir/compiler/nimpaths.nim
rm -f $nimbleDir/compiler/nimsets.nim
rm -f $nimbleDir/compiler/nodejs.nim
rm -f $nimbleDir/compiler/nversion.nim
rm -f $nimbleDir/compiler/optimizer.nim
rm -f $nimbleDir/compiler/options.nim
rm -f $nimbleDir/compiler/packagehandling.nim
rm -f $nimbleDir/compiler/packages.nim
rm -f $nimbleDir/compiler/parampatterns.nim
rm -f $nimbleDir/compiler/parser.nim
rm -f $nimbleDir/compiler/passaux.nim
rm -f $nimbleDir/compiler/passes.nim
rm -f $nimbleDir/compiler/pathutils.nim
rm -f $nimbleDir/compiler/patterns.nim
rm -f $nimbleDir/compiler/pipelines.nim
rm -f $nimbleDir/compiler/pipelineutils.nim
rm -f $nimbleDir/compiler/platform.nim
rm -f $nimbleDir/compiler/plugins/active.nim
rm -f $nimbleDir/compiler/plugins/locals.nim
rm -f $nimbleDir/compiler/plugins/itersgen.nim
rm -f $nimbleDir/compiler/pluginsupport.nim
rm -f $nimbleDir/compiler/pragmas.nim
rm -f $nimbleDir/compiler/prefixmatches.nim
rm -f $nimbleDir/compiler/procfind.nim
rm -f $nimbleDir/compiler/readme.md
rm -f $nimbleDir/compiler/renderer.nim
rm -f $nimbleDir/compiler/renderverbatim.nim
rm -f $nimbleDir/compiler/reorder.nim
rm -f $nimbleDir/compiler/rodutils.nim
rm -f $nimbleDir/compiler/ropes.nim
rm -f $nimbleDir/compiler/saturate.nim
rm -f $nimbleDir/compiler/scriptconfig.nim
rm -f $nimbleDir/compiler/sem.nim
rm -f $nimbleDir/compiler/semcall.nim
rm -f $nimbleDir/compiler/semdata.nim
rm -f $nimbleDir/compiler/semexprs.nim
rm -f $nimbleDir/compiler/semfields.nim
rm -f $nimbleDir/compiler/semfold.nim
rm -f $nimbleDir/compiler/semgnrc.nim
rm -f $nimbleDir/compiler/seminst.nim
rm -f $nimbleDir/compiler/semmacrosanity.nim
rm -f $nimbleDir/compiler/semmagic.nim
rm -f $nimbleDir/compiler/semobjconstr.nim
rm -f $nimbleDir/compiler/semparallel.nim
rm -f $nimbleDir/compiler/sempass2.nim
rm -f $nimbleDir/compiler/semstmts.nim
rm -f $nimbleDir/compiler/semstrictfuncs.nim
rm -f $nimbleDir/compiler/semtempl.nim
rm -f $nimbleDir/compiler/semtypes.nim
rm -f $nimbleDir/compiler/semtypinst.nim
rm -f $nimbleDir/compiler/sighashes.nim
rm -f $nimbleDir/compiler/sigmatch.nim
rm -f $nimbleDir/compiler/sinkparameter_inference.nim
rm -f $nimbleDir/compiler/sizealignoffsetimpl.nim
rm -f $nimbleDir/compiler/sourcemap.nim
rm -f $nimbleDir/compiler/spawn.nim
rm -f $nimbleDir/compiler/suggest.nim
rm -f $nimbleDir/compiler/syntaxes.nim
rm -f $nimbleDir/compiler/tccgen.nim
rm -f $nimbleDir/compiler/transf.nim
rm -f $nimbleDir/compiler/trees.nim
rm -f $nimbleDir/compiler/treetab.nim
rm -f $nimbleDir/compiler/typeallowed.nim
rm -f $nimbleDir/compiler/types.nim
rm -f $nimbleDir/compiler/typesrenderer.nim
rm -f $nimbleDir/compiler/varpartitions.nim
rm -f $nimbleDir/compiler/vm.nim
rm -f $nimbleDir/compiler/vmconv.nim
rm -f $nimbleDir/compiler/vmdef.nim
rm -f $nimbleDir/compiler/vmdeps.nim
rm -f $nimbleDir/compiler/vmgen.nim
rm -f $nimbleDir/compiler/vmhooks.nim
rm -f $nimbleDir/compiler/vmmarshal.nim
rm -f $nimbleDir/compiler/vmops.nim
rm -f $nimbleDir/compiler/vmprofiler.nim
rm -f $nimbleDir/compiler/wordrecg.nim
rm -f $nimbleDir/doc/basicopt.txt
rm -f $nimbleDir/doc/advopt.txt
rm -f $nimbleDir/doc/nimdoc.css
rm -f $nimbleDir/nim.nimble
echo "deinstallation successful"
else
echo "Nim deinstallation script"
echo "Usage: [sudo] sh deinstall.sh DIR"
echo "Where DIR may be:"
echo " /usr/bin"
echo " /usr/local/bin"
echo " /opt"
echo " <some other dir> (treated similar '/opt')"
exit 1
fi