mirror of
https://github.com/golang/go
synced 2024-11-25 00:17:58 -07:00
72faa0303e
This change is necessary to make the run shell script work again, but it is not sufficient as bug424.go's execution line does not name the package that it imports. R=golang-dev, gri, rsc CC=golang-dev https://golang.org/cl/5771043
41 lines
634 B
Plaintext
41 lines
634 B
Plaintext
# 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() {
|
|
gofiles=""
|
|
ingo=true
|
|
while $ingo; do
|
|
case "$1" in
|
|
*.go)
|
|
gofiles="$gofiles $1"
|
|
shift
|
|
;;
|
|
*)
|
|
ingo=false
|
|
;;
|
|
esac
|
|
done
|
|
|
|
$G $D/$F.go $gofiles && $L $F.$A && ./$A.out "$@"
|
|
}
|
|
|
|
cmpout() {
|
|
$G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
|
|
}
|
|
|
|
errorcheck() {
|
|
errchk $G -e $D/$F.go
|
|
}
|