Archived
1
0

Clean generated files once compilation is complete

This commit is contained in:
Jip J. Dekker 2016-03-30 15:16:33 +02:00
parent 3f94b18865
commit 97cb99eed7

View File

@ -84,4 +84,15 @@ func MakeBook(path string, opts *settings.Settings) {
"error": err,
}).Fatal("songbook failed to compile")
}
cmd = exec.Command("latexmk", "-c", "-cd", texPath)
out, err = cmd.CombinedOutput()
if err != nil {
log.WithFields(log.Fields{
"message": string(out),
"error": err,
}).Error("failed to clean songbook latex files")
}
err = os.Remove(texPath)
helpers.Check(err, "could not remove songbook latex template")
}