Merge "Debian env scripts: allow user overrides"
This commit is contained in:
commit
4c67a7c20b
|
@ -21,5 +21,6 @@ fi
|
||||||
|
|
||||||
export PRJDIR=$(pwd)
|
export PRJDIR=$(pwd)
|
||||||
export PATH=$PRJDIR/stx/bin:$PATH
|
export PATH=$PRJDIR/stx/bin:$PATH
|
||||||
export MINIKUBENAME=minikube-$USER-upstream
|
export MINIKUBENAME=${MINIKUBENAME:-minikube-$USER-upstream}
|
||||||
export KUBECONFIG=$MINIKUBE_HOME/.kube/config
|
export KUBECONFIG=$MINIKUBE_HOME/.kube/config
|
||||||
|
export STX_BUILD_HOME="${STX_BUILD_HOME:-/localdisk/$USER}"
|
||||||
|
|
32
stx-init-env
32
stx-init-env
|
@ -49,32 +49,16 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VolumePath=$1
|
if [ ! -d "$STX_BUILD_HOME" ]; then
|
||||||
|
echo "Warning: The directory $STX_BUILD_HOME doesn't exist, please create it with the command:"
|
||||||
if [ x"$VolumePath"==x"" ]; then
|
echo ""
|
||||||
|
echo " mkdir -p $STX_BUILD_HOME"
|
||||||
VolumePath="/localdisk/$USER"
|
echo ""
|
||||||
|
echo "Then execute this script again!"
|
||||||
if [ ! -d "$VolumePath" ]; then
|
return 1
|
||||||
echo "Warning: The directory $VolumePath doesn't exist, please create it with the command:"
|
|
||||||
echo ""
|
|
||||||
echo " mkdir -p $VolumePath"
|
|
||||||
echo ""
|
|
||||||
echo "or User the command 'source stx-init-env Your/Path' to redefine the shared volume"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ ! -d "$VolumePath" ]; then
|
|
||||||
echo "Warning: The directory $VolumePath doesn't exist, please create it with the command:"
|
|
||||||
echo ""
|
|
||||||
echo " mkdir -p $VolumePath"
|
|
||||||
echo ""
|
|
||||||
echo "Then execute this script again!"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$MINIKUBE start --driver=docker -p $MINIKUBENAME --mount=true --mount-string="$VolumePath:/workspace"
|
$MINIKUBE start --driver=docker -p $MINIKUBENAME --mount=true --mount-string="$STX_BUILD_HOME:/workspace"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue