From 845529c1678b8dbe944c2633dfcd6cfa90b1e4f5 Mon Sep 17 00:00:00 2001 From: Mark McGranaghan Date: Sat, 17 Nov 2012 08:22:49 -0800 Subject: [PATCH] use vendored pygmentize --- tools/generate.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tools/generate.go b/tools/generate.go index 6e8d816..3aceaa3 100644 --- a/tools/generate.go +++ b/tools/generate.go @@ -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")