Skip to content

Commit 2058409

Browse files
authored
Merge pull request #101 from lhriley/patch-1
Fix install-composable.sh
2 parents 3ee876e + 9dfa5a5 commit 2058409

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

hack/install-composable.sh

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Copyright 2019 IBM Corp. All Rights Reserved.
44
#
@@ -20,20 +20,21 @@
2020

2121
set -e
2222

23-
RELEASE="latest/"
24-
25-
# check if running piped from curl
26-
if [ -z ${BASH_SOURCE} ]; then
27-
echo "* Downloading install yaml..."
28-
rm -rf /tmp/ibm-composable && mkdir -p /tmp/ibm-composable
29-
cd /tmp/ibm-composable
30-
curl -sLJO https://github.com/IBM/composable/archive/master.zip
31-
unzip -qq composable-master.zip
32-
cd composable-master
33-
SCRIPTS_HOME=${PWD}/hack
23+
#
24+
# This will clone the composable-operator/composable git repo to the director
25+
# where this script is located, and install the kustomize resources in config/default
26+
#
27+
28+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
29+
30+
gitdir="${SCRIPT_DIR}/composable"
31+
32+
if [[ ! -d "${gitdir}" ]]; then
33+
git -C "${SCRIPT_DIR}" clone [email protected]:composable-operator/composable.git
3434
else
35-
SCRIPTS_HOME=$(dirname ${BASH_SOURCE})
35+
git -C "${gitdir}" pull --autostash
3636
fi
3737

38-
# install the operator
39-
kubectl apply -f ${SCRIPTS_HOME}/../releases/${RELEASE}
38+
echo "Installing composable-operator"
39+
40+
kubectl apply -k "${gitdir}/config/default/"

0 commit comments

Comments
 (0)