Skip to content

Commit

Permalink
Merge pull request #101 from lhriley/patch-1
Browse files Browse the repository at this point in the history
Fix install-composable.sh
  • Loading branch information
xvzf authored Apr 11, 2023
2 parents 3ee876e + 9dfa5a5 commit 2058409
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions hack/install-composable.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2019 IBM Corp. All Rights Reserved.
#
Expand All @@ -20,20 +20,21 @@

set -e

RELEASE="latest/"

# check if running piped from curl
if [ -z ${BASH_SOURCE} ]; then
echo "* Downloading install yaml..."
rm -rf /tmp/ibm-composable && mkdir -p /tmp/ibm-composable
cd /tmp/ibm-composable
curl -sLJO https://github.com/IBM/composable/archive/master.zip
unzip -qq composable-master.zip
cd composable-master
SCRIPTS_HOME=${PWD}/hack
#
# This will clone the composable-operator/composable git repo to the director
# where this script is located, and install the kustomize resources in config/default
#

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

gitdir="${SCRIPT_DIR}/composable"

if [[ ! -d "${gitdir}" ]]; then
git -C "${SCRIPT_DIR}" clone [email protected]:composable-operator/composable.git
else
SCRIPTS_HOME=$(dirname ${BASH_SOURCE})
git -C "${gitdir}" pull --autostash
fi

# install the operator
kubectl apply -f ${SCRIPTS_HOME}/../releases/${RELEASE}
echo "Installing composable-operator"

kubectl apply -k "${gitdir}/config/default/"

0 comments on commit 2058409

Please sign in to comment.