go-ethereum/build/clean_go_build_cache.sh
Hyung-Kyu Choi 7135566ac6 build: use /bin/sh intead of /bin/bash
- use /bin/sh intead of /bin/bash

Signed-off-by: Hyung-Kyu Choi <hqueue@users.noreply.github.com>
2018-06-26 13:30:06 +09:00

10 lines
296 B
Bash
Executable file

#!/bin/sh
function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
golang_version=$(go version |cut -d' ' -f3 |sed 's/go//')
# Clean go build cache when go version is greater than or equal to 1.10
if !(version_gt 1.10 $golang_version); then
go clean -cache
fi