tools/import-stx
Zhixiong Chi 276ec76bba stx tool: Rename stx.conf to stx.conf.sample
Rename stx.conf to stx.conf.sample, now we don't modify directly the
original config sample file any more.
When we start the project with import-stx script, we will copy the
new stx.conf file from the sample.

Story: 2008862
Task: 43165

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Change-Id: Id8eaea93cc2e99461130380f714ad4d2b8adb04b
2021-11-05 05:50:28 -04:00

31 lines
840 B
Plaintext

# 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}"
if [ ! -f "stx.conf" ]; then
cp stx.conf.sample stx.conf
fi