|
|
@ -6,6 +6,7 @@ _init() { |
|
|
|
PIP_VERSION="1.4" |
|
|
|
PIP_VERSION="1.4" |
|
|
|
GCC_VERSION="4.0" |
|
|
|
GCC_VERSION="4.0" |
|
|
|
YASM_VERSION="1.2.0" |
|
|
|
YASM_VERSION="1.2.0" |
|
|
|
|
|
|
|
OSX_VERSION="10.8" |
|
|
|
UNAME=$(uname -sm) |
|
|
|
UNAME=$(uname -sm) |
|
|
|
MINIO_DEV=$HOME/minio-dev |
|
|
|
MINIO_DEV=$HOME/minio-dev |
|
|
|
} |
|
|
|
} |
|
|
@ -30,7 +31,7 @@ pop_dir() { |
|
|
|
popd >/dev/null |
|
|
|
popd >/dev/null |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
### |
|
|
|
#### |
|
|
|
# |
|
|
|
# |
|
|
|
# Takes two arguments |
|
|
|
# Takes two arguments |
|
|
|
# arg1: version number in `x.x.x` format |
|
|
|
# arg1: version number in `x.x.x` format |
|
|
@ -65,11 +66,9 @@ check_version () { |
|
|
|
ver2[i]=0 |
|
|
|
ver2[i]=0 |
|
|
|
fi |
|
|
|
fi |
|
|
|
if ((10#${ver1[i]} > 10#${ver2[i]})); then |
|
|
|
if ((10#${ver1[i]} > 10#${ver2[i]})); then |
|
|
|
|
|
|
|
|
|
|
|
return 1 |
|
|
|
return 1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
if ((10#${ver1[i]} < 10#${ver2[i]})); then |
|
|
|
if ((10#${ver1[i]} < 10#${ver2[i]})); then |
|
|
|
## Installed version is lesser than required - Bad condition |
|
|
|
|
|
|
|
return 2 |
|
|
|
return 2 |
|
|
|
fi |
|
|
|
fi |
|
|
|
done |
|
|
|
done |
|
|
@ -82,9 +81,6 @@ is_supported_arch() { |
|
|
|
"x86_64") |
|
|
|
"x86_64") |
|
|
|
supported=1 |
|
|
|
supported=1 |
|
|
|
;; |
|
|
|
;; |
|
|
|
"i386") |
|
|
|
|
|
|
|
supported=0 |
|
|
|
|
|
|
|
;; |
|
|
|
|
|
|
|
*) |
|
|
|
*) |
|
|
|
supported=0 |
|
|
|
supported=0 |
|
|
|
;; |
|
|
|
;; |
|
|
@ -100,15 +96,19 @@ install_go() { |
|
|
|
case ${UNAME%% *} in |
|
|
|
case ${UNAME%% *} in |
|
|
|
"Linux") |
|
|
|
"Linux") |
|
|
|
os="linux" |
|
|
|
os="linux" |
|
|
|
|
|
|
|
GOLANG_TARBALL_FNAME="go${GO_VERSION}.${os}-amd64.tar.gz" |
|
|
|
;; |
|
|
|
;; |
|
|
|
esac |
|
|
|
"Darwin") |
|
|
|
case ${UNAME##* } in |
|
|
|
os="darwin" |
|
|
|
"x86_64") |
|
|
|
osx_host_version=$(env sw_vers -productVersion) |
|
|
|
arch="amd64" |
|
|
|
check_version "${osx_host_version}" "${OSX_VERSION}" |
|
|
|
;; |
|
|
|
[[ $? -ge 2 ]] && die "Minimum OSX version supported is ${OSX_VERSION}" |
|
|
|
|
|
|
|
GOLANG_TARBALL_FNAME="go${GO_VERSION}.${os}-amd64-osx${OSX_VERSION}.tar.gz" |
|
|
|
|
|
|
|
;; |
|
|
|
|
|
|
|
"*") |
|
|
|
|
|
|
|
die "Exiting.. unsupported operating system found" |
|
|
|
esac |
|
|
|
esac |
|
|
|
|
|
|
|
|
|
|
|
GOLANG_TARBALL_FNAME="go$GO_VERSION.$os-$arch.tar.gz" |
|
|
|
|
|
|
|
GOLANG_TARBALL_URL="https://storage.googleapis.com/golang/$GOLANG_TARBALL_FNAME" |
|
|
|
GOLANG_TARBALL_URL="https://storage.googleapis.com/golang/$GOLANG_TARBALL_FNAME" |
|
|
|
|
|
|
|
|
|
|
|
status_code=$(curl -w '%{http_code}' --progress-bar -L -C - $GOLANG_TARBALL_URL -o $MINIO_DEV/dls/$GOLANG_TARBALL_FNAME) |
|
|
|
status_code=$(curl -w '%{http_code}' --progress-bar -L -C - $GOLANG_TARBALL_URL -o $MINIO_DEV/dls/$GOLANG_TARBALL_FNAME) |
|
|
|