@@ -134,6 +134,10 @@ if [ "$1" = "-advanced" -o "$1" = "--advanced" ]; then
134
134
exit 0
135
135
fi
136
136
137
+ # ####################################################################
138
+ # Package handling
139
+ # ####################################################################
140
+
137
141
if [ " $1 " = ' -package' -o " $1 " = " --package" ]; then
138
142
shift
139
143
exec sage-package $@
@@ -173,5 +177,111 @@ if [ "$1" = '-info' -o "$1" = '--info' ]; then
173
177
exit 0
174
178
fi
175
179
176
- echo " Error: Unknown option: $1 "
180
+ # ####################################################################
181
+ # Building the documentation.
182
+ # ####################################################################
183
+
184
+ if [ " $1 " = " -docbuild" -o " $1 " = " --docbuild" ]; then
185
+ # Redirect stdin from /dev/null. This helps with running TeX which
186
+ # tends to ask interactive questions if something goes wrong. These
187
+ # cause the build to hang. If stdin is /dev/null, TeX just aborts.
188
+ shift
189
+ exec sage-python -m sage_setup.docbuild " $@ " < /dev/null
190
+ fi
191
+
192
+ # ####################################################################
193
+ # Run Sage's versions of its component packages
194
+ # ####################################################################
195
+
196
+ if [ " $1 " = ' -axiom' -o " $1 " = ' --axiom' ]; then
197
+ shift
198
+ exec axiom " $@ "
199
+ fi
200
+
201
+ if [ " $1 " = " -cython" -o " $1 " = ' --cython' -o " $1 " = ' -pyrex' -o " $1 " = " --pyrex" ]; then
202
+ shift
203
+ exec sage-cython " $@ "
204
+ fi
205
+
206
+ if [ " $1 " = ' -gap' -o " $1 " = ' --gap' ]; then
207
+ shift
208
+ exec gap " $@ "
209
+ fi
210
+
211
+ if [ " $1 " = ' -gap3' -o " $1 " = ' --gap3' ]; then
212
+ shift
213
+ exec gap3 " $@ "
214
+ fi
215
+
216
+ if [ " $1 " = ' -gp' -o " $1 " = ' --gp' ]; then
217
+ shift
218
+ exec gp " $@ "
219
+ fi
220
+
221
+ if [ " $1 " = ' -polymake' -o " $1 " = ' --polymake' ]; then
222
+ shift
223
+ exec polymake " $@ "
224
+ fi
225
+
226
+ if [ " $1 " = ' -singular' -o " $1 " = ' --singular' ]; then
227
+ shift
228
+ exec Singular " $@ "
229
+ fi
230
+
231
+ if [ " $1 " = ' -sqlite3' -o " $1 " = ' --sqlite3' ]; then
232
+ shift
233
+ exec sqlite3 " $@ "
234
+ fi
235
+
236
+ if [ " $1 " = ' -ecl' -o " $1 " = ' --ecl' ]; then
237
+ shift
238
+ exec ecl " $@ "
239
+ fi
240
+
241
+ if [ " $1 " = ' -lisp' -o " $1 " = ' --lisp' ]; then
242
+ shift
243
+ exec ecl " $@ "
244
+ fi
245
+
246
+ if [ " $1 " = ' -kash' -o " $1 " = ' --kash' ]; then
247
+ shift
248
+ exec kash " $@ "
249
+ fi
250
+
251
+ if [ " $1 " = ' -maxima' -o " $1 " = ' --maxima' ]; then
252
+ shift
253
+ exec maxima " $@ "
254
+ fi
255
+
256
+ if [ " $1 " = ' -mwrank' -o " $1 " = ' --mwrank' ]; then
257
+ shift
258
+ exec mwrank " $@ "
259
+ fi
260
+
261
+ if [ " $1 " = ' -M2' -o " $1 " = ' --M2' ]; then
262
+ shift
263
+ exec M2 " $@ "
264
+ fi
265
+
266
+ if [ " $1 " = ' -scons' -o " $1 " = ' --scons' ]; then
267
+ shift
268
+ exec scons " $@ "
269
+ fi
270
+
271
+ if [ " $1 " = ' -R' -o " $1 " = ' --R' ]; then
272
+ shift
273
+ exec R " $@ "
274
+ fi
275
+
276
+ if [ " $1 " = ' -git' -o " $1 " = ' --git' ]; then
277
+ shift
278
+ exec git " $@ "
279
+ fi
280
+
281
+ if [ " $1 " = ' -git-branch' -o " $1 " = ' --git-branch' ]; then
282
+ shift
283
+ exec git --git-dir=" $SAGE_ROOT " /.git rev-parse --abbrev-ref HEAD
284
+ fi
285
+
286
+ echo " Error: unknown option: $1 "
177
287
exit 1
0 commit comments