ignore empty directories when looking for kube/web-certs

parent 718578f3
......@@ -376,10 +376,12 @@ echo "# secret to pull images from analytics-toolkit.nomad-coe.eu:5509"
echo " kubectl create secret docker-registry garching-kube --docker-server=analytics-toolkit.nomad-coe.eu:5509 --docker-username=\$DOCKER_USERNAME --docker-password=\"\$DOCKER_PASSWORD\" --docker-email=\$DOCKER_EMAIL"
echo " kubectl --namespace analytics create secret docker-registry garching-kube --docker-server=analytics-toolkit.nomad-coe.eu:5509 --docker-username=\$DOCKER_USERNAME --docker-password=\"\$DOCKER_PASSWORD\" --docker-email=\$DOCKER_EMAIL"
echo "# get certificates to connect to kubernetes (either from kube-certs of ~/.minikube)"
echo " if [ -e kube-certs ] ; then"
echo " if [ -f kube-certs/client.key ] ; then"
echo " pushd kube-certs"
echo " elif [ -e ../kube-certs ] ; then"
echo " elif [ -e ../kube-certs/client.key ] ; then"
echo " pushd ../kube-certs"
echo " elif [ -e ../../kube-certs/client.key ] ; then"
echo " pushd ../../kube-certs"
echo " elif [ -e ~/.minikube ] ; then"
echo " mkdir -p ./kube-certs"
echo " pushd kube-certs"
......@@ -406,10 +408,12 @@ else
fi
echo " popd"
echo "# create secret with web certificates"
echo " if [ -e web-certs ] ; then"
echo " if [ -f web-certs/key.pem ] ; then"
echo " pushd web-certs"
echo " elif [ -e ../web-certs ]; then"
echo " elif [ -f ../web-certs/key.pem ]; then"
echo " pushd ../web-certs"
echo " elif [ -f ../../web-certs/key.pem ]; then"
echo " pushd ../../web-certs"
echo " else"
echo " pushd ."
echo " fi"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment