mirror of
https://github.com/golang/go
synced 2024-11-22 06:54:39 -07:00
d1a3edaee7
Also update the big example to the new template system. There are a number of other examples that should be extracted; this CL serves as an introduction to the approach. R=golang-dev, adg CC=golang-dev https://golang.org/cl/4923043
18 lines
409 B
Bash
Executable File
18 lines
409 B
Bash
Executable File
#!/bin/sh
|
|
# Copyright 2009 The Go Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style
|
|
# license that can be found in the LICENSE file.
|
|
|
|
set -e
|
|
|
|
TMPL=${1:-go_tutorial.tmpl} # input file
|
|
HTML=$(basename $TMPL .tmpl).html # output file (basename)
|
|
|
|
if ! test -w $HTML
|
|
then
|
|
echo 1>&2 makehtml: cannot open $HTML for write
|
|
exit 1
|
|
fi
|
|
|
|
make tmpltohtml && ./tmpltohtml $TMPL > $HTML
|