| # This script generates a version of tls.go that can be built with Go compilers |
| source "$(go list -f {{.Dir}} veyron.io/veyron/shell/lib)/shell_test.sh" |
| local -r DIR="$(dirname "$0")" |
| local -r INFILE="${DIR}/tls.go" |
| local OUTFILE="${DIR}/tls_old.go" |
| [[ "$#" -gt 0 ]] && OUTFILE="$1" |
| // THIS IS NOT THE FILE YOU WANT. |
| // DO NOT EDIT THIS FILE. |
| // This file has been generated using the tls_generate_old.sh script. |
| // Please do NOT make edits to this file. Instead edit tls.go and |
| // use the script to regenerate this file |
| sed -e 's|// +build go1.4|// +build !go1.4|' | |
| sed -e 's|"crypto/tls"|tls "veyron.io/veyron/veyron/runtimes/google/ipc/stream/crypto/tlsfork"|' >>$OUTFILE |
| veyron go fmt "${OUTFILE}" |