mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
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>
This commit is contained in:
parent
2d170afaf0
commit
7135566ac6
1 changed files with 2 additions and 10 deletions
|
|
@ -1,16 +1,8 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
|
||||
function go_version {
|
||||
version=$(go version)
|
||||
echo $version
|
||||
regex="([0-9].[0-9]+.[0-9])"
|
||||
if [[ $version =~ $regex ]]; then
|
||||
echo ${BASH_REMATCH[1]}
|
||||
fi
|
||||
}
|
||||
|
||||
golang_version=$(go_version)
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue