mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-06 15:13:56 +02:00
Make install.sh pass shellcheck (#14353)
This commit is contained in:
parent
de1e9093ab
commit
28717ad3a8
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ publicIpFromInterface() {
|
||||||
echo "Couldn't find a valid ipv4 address, using the first IP found on the interfaces as the endpoint."
|
echo "Couldn't find a valid ipv4 address, using the first IP found on the interfaces as the endpoint."
|
||||||
DEFAULT_INTERFACE="$(ip -4 route list match default | grep -Eo "dev .*" | awk '{print $2}')"
|
DEFAULT_INTERFACE="$(ip -4 route list match default | grep -Eo "dev .*" | awk '{print $2}')"
|
||||||
ENDPOINT=$(ip -4 addr sh dev "$DEFAULT_INTERFACE" | grep -w inet | head -n1 | awk '{print $2}' | grep -oE '\b([0-9]{1,3}\.){3}[0-9]{1,3}\b')
|
ENDPOINT=$(ip -4 addr sh dev "$DEFAULT_INTERFACE" | grep -w inet | head -n1 | awk '{print $2}' | grep -oE '\b([0-9]{1,3}\.){3}[0-9]{1,3}\b')
|
||||||
export ENDPOINT=$ENDPOINT
|
export ENDPOINT="${ENDPOINT}"
|
||||||
echo "Using ${ENDPOINT} as the endpoint"
|
echo "Using ${ENDPOINT} as the endpoint"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ publicIpFromMetadata() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if echo "${ENDPOINT}" | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b"; then
|
if echo "${ENDPOINT}" | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b"; then
|
||||||
export ENDPOINT=$ENDPOINT
|
export ENDPOINT="${ENDPOINT}"
|
||||||
echo "Using ${ENDPOINT} as the endpoint"
|
echo "Using ${ENDPOINT} as the endpoint"
|
||||||
else
|
else
|
||||||
publicIpFromInterface
|
publicIpFromInterface
|
||||||
|
|
Loading…
Add table
Reference in a new issue