github.com/roboticscm/goman@v0.0.0-20210203095141-87c07b4a0a55/doc/progs/update.bash (about)

     1  #!/usr/bin/env bash
     2  # Copyright 2012 The Go Authors. All rights reserved.
     3  # Use of this source code is governed by a BSD-style
     4  # license that can be found in the LICENSE file.
     5  
     6  set -e
     7  
     8  rm -f *.out *.rej *.orig [568].out
     9  
    10  for i in *.go; do
    11  	if grep -q '^// cmpout$' $i; then
    12  		echo $i
    13  		go run $i &> ${i/.go/.out}
    14  	fi
    15  done