
- import-stx: allow users to override MINIKUBENAME - stx-init-env: push VolumePath via the environment. This script appears to have been designed to be sourced (it uses "return" statements rather than "exit"), yet it attempts to process a command-line argument ($1), which doesn't work in sourced files. Solution: define docker mount point in import-stx as an environment variable. Story: 2008846 Task: 43753 Signed-off-by: Davlet Panech <davlet.panech@windriver.com> Change-Id: I489be2276bc2f0798affaf6c334614648f5922c2
27 lines
780 B
Bash
Executable File
27 lines
780 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ -z "$MINIKUBE_HOME" ];then
|
|
MINIKUBE_HOME=$HOME
|
|
else
|
|
if [ ! -d "$MINIKUBE_HOME" ]; then
|
|
echo "The directory defined by \$MINIKUBE_HOME doesn't exist"
|
|
return 1
|
|
fi
|
|
fi
|
|
|
|
FSTYPE=$(stat -f -L -c %T $MINIKUBE_HOME)
|
|
if [ x"$FSTYPE" == x"nfs" ]; then
|
|
echo ""
|
|
echo "Warning: stx minikube doesn't allow \$MINIKUBE_HOME or \$HOME directory as nfs mount point!!!"
|
|
echo " Please set non-nfs MINIKUBE_HOME with the command 'export MINIKUBE_HOME=XXX/YYY'"
|
|
echo ""
|
|
unset MINIKUBE_HOME
|
|
return 1
|
|
fi
|
|
|
|
export PRJDIR=$(pwd)
|
|
export PATH=$PRJDIR/stx/bin:$PATH
|
|
export MINIKUBENAME=${MINIKUBENAME:-minikube-$USER-upstream}
|
|
export KUBECONFIG=$MINIKUBE_HOME/.kube/config
|
|
export STX_BUILD_HOME="${STX_BUILD_HOME:-/localdisk/$USER}"
|