|
@ -2,14 +2,15 @@ |
|
|
|
|
|
|
|
|
set -e |
|
|
set -e |
|
|
|
|
|
|
|
|
version=${1:-master} |
|
|
|
|
|
profile_name=${2:-kubespray} |
|
|
|
|
|
|
|
|
repository=${1:-https://github.com/projectatomic/container-storage-setup.git} |
|
|
|
|
|
version=${2:-master} |
|
|
|
|
|
profile_name=${3:-kubespray} |
|
|
dir=`mktemp -d` |
|
|
dir=`mktemp -d` |
|
|
export GIT_DIR=$dir/.git |
|
|
export GIT_DIR=$dir/.git |
|
|
export GIT_WORK_TREE=$dir |
|
|
export GIT_WORK_TREE=$dir |
|
|
|
|
|
|
|
|
git init |
|
|
git init |
|
|
git fetch --depth 1 https://github.com/projectatomic/container-storage-setup.git $version |
|
|
|
|
|
|
|
|
git fetch --depth 1 $repository $version |
|
|
git merge FETCH_HEAD |
|
|
git merge FETCH_HEAD |
|
|
make -C $dir install |
|
|
make -C $dir install |
|
|
rm -rf /var/lib/container-storage-setup/$profile_name $dir |
|
|
rm -rf /var/lib/container-storage-setup/$profile_name $dir |
|
@ -17,6 +18,6 @@ rm -rf /var/lib/container-storage-setup/$profile_name $dir |
|
|
set +e |
|
|
set +e |
|
|
|
|
|
|
|
|
/usr/bin/container-storage-setup create $profile_name /etc/sysconfig/docker-storage-setup && /usr/bin/container-storage-setup activate $profile_name |
|
|
/usr/bin/container-storage-setup create $profile_name /etc/sysconfig/docker-storage-setup && /usr/bin/container-storage-setup activate $profile_name |
|
|
# FIXME: exit status can be 1 for both fatal and non fatal errors in current release, |
|
|
|
|
|
# could be improved by matching error strings |
|
|
|
|
|
|
|
|
# FIXME: exit status can be 1 for both fatal and non fatal errors in current release, |
|
|
|
|
|
# could be improved by matching error strings |
|
|
exit 0 |
|
|
exit 0 |