-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from lhriley/patch-1
Fix install-composable.sh
- Loading branch information
Showing
1 changed file
with
16 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
# | ||
|
@@ -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/" |