Skip to content

Commit dfa6db7

Browse files
improve install script
1 parent 76a9c84 commit dfa6db7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

contrib/istio/install.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#!/usr/bin/env bash
22

3+
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
4+
35
cluster=$1
4-
operator=istio-operator-$cluster.yaml
6+
operator="${SCRIPT_DIR}/istio-operator-${cluster}.yaml"
57
if ! [[ -f $operator ]]; then
6-
echo "no such file: $operator"
7-
exit 1
8+
operator="${SCRIPT_DIR}/${cluster}"
9+
if ! [[ -f $operator ]]; then
10+
echo "no such file: $operator"
11+
exit 1
12+
fi
813
fi
914

1015
istioctl install -f "${operator}"

0 commit comments

Comments
 (0)