Files
ray/doc/tools/install-prometheus-server.sh
T
mehrdadn b14728d999 Shellcheck quoting (#9596)
* Fix SC2006: Use $(...) notation instead of legacy backticked `...`.

* Fix SC2016: Expressions don't expand in single quotes, use double quotes for that.

* Fix SC2046: Quote this to prevent word splitting.

* Fix SC2053: Quote the right-hand side of == in [[ ]] to prevent glob matching.

* Fix SC2068: Double quote array expansions to avoid re-splitting elements.

* Fix SC2086: Double quote to prevent globbing and word splitting.

* Fix SC2102: Ranges can only match single chars (mentioned due to duplicates).

* Fix SC2140: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?

* Fix SC2145: Argument mixes string and array. Use * or separate argument.

* Fix SC2209: warning: Use var=$(command) to assign output (or quote to assign string).

Co-authored-by: Mehrdad <noreply@github.com>
2020-07-21 21:56:41 -05:00

28 lines
663 B
Bash
Executable File

#!/usr/bin/env bash
set -x
set -e
TOOLS_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
pushd "$TOOLS_DIR"
# Download Prometheus server.
unamestr="$(uname)"
if [[ "$unamestr" == "Linux" ]]; then
echo "Downloading Prometheus server for linux system."
PACKAGE_NAME=prometheus-2.8.0.linux-amd64
elif [[ "$unamestr" == "Darwin" ]]; then
echo "Downloading Prometheus server for MacOS system."
PACKAGE_NAME=prometheus-2.8.0.darwin-amd64
else
echo "Downloading abort: Unrecognized platform."
exit -1
fi
URL=https://github.com/prometheus/prometheus/releases/download/v2.8.0/$PACKAGE_NAME.tar.gz
wget $URL
tar xvfz $PACKAGE_NAME.tar.gz
popd