use vendored pygmentize

This commit is contained in:
Mark McGranaghan 2012-11-17 08:22:49 -08:00
parent 8d31ec147c
commit 845529c167

View File

@ -15,7 +15,7 @@ import (
var cacheDir = "/tmp/gobyexample-cache"
var siteDir = "./public"
var pygmentizeBin = ""
var pygmentizeBin = "./vendor/pygments/pygmentize"
func check(err error) {
if err != nil {
@ -106,12 +106,6 @@ func whichLexer(path string) string {
return ""
}
func whichPygmentize() {
bin, err := exec.LookPath("pygmentize")
check(err)
pygmentizeBin = bin
}
func debug(msg string) {
if os.Getenv("DEBUG") == "1" {
fmt.Fprintln(os.Stderr, msg)
@ -245,7 +239,6 @@ func renderExamples(examples []*Example) {
}
func main() {
whichPygmentize()
copyFile("templates/site.css", siteDir+"/site.css")
copyFile("templates/favicon.ico", siteDir+"/favicon.ico")
copyFile("templates/404.html", siteDir+"/404.html")