Source

SageTeX / script

Full commit
#!/bin/bash

S=sagetexpackage

# script to extract and build everything 

latex -interaction=nonstopmode $S.ins
latex -interaction=nonstopmode $S.dtx
sage $S.sage
makeindex -s gglo.ist -o $S.gls $S.glo 
makeindex -s gind.ist -o $S.ind $S.idx
latex  -interaction=nonstopmode  $S.dtx
latex  -interaction=nonstopmode example.tex
sage example.sage
latex  -interaction=nonstopmode example.tex
pdflatex  -interaction=nonstopmode example.tex