2012-02-16 21:48:24 -07:00
|
|
|
# Copyright 2012 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.
|
|
|
|
|
|
|
|
# These function names are also known to
|
|
|
|
# (and are the plan for transitioning to) run.go.
|
|
|
|
|
|
|
|
compile() {
|
|
|
|
$G $D/$F.go
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
$G $D/$F.go && $L $F.$A
|
|
|
|
}
|
|
|
|
|
|
|
|
run() {
|
2012-03-06 23:54:39 -07:00
|
|
|
gofiles=""
|
|
|
|
ingo=true
|
|
|
|
while $ingo; do
|
|
|
|
case "$1" in
|
|
|
|
*.go)
|
|
|
|
gofiles="$gofiles $1"
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
ingo=false
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2012-03-07 12:16:58 -07:00
|
|
|
$G $D/$F.go $gofiles && $L $F.$A && ./$A.out "$@"
|
2012-02-16 21:48:24 -07:00
|
|
|
}
|
|
|
|
|
2012-02-23 19:17:26 -07:00
|
|
|
cmpout() {
|
|
|
|
$G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
|
|
|
|
}
|
|
|
|
|
2012-02-16 21:48:24 -07:00
|
|
|
errorcheck() {
|
|
|
|
errchk $G -e $D/$F.go
|
|
|
|
}
|