commit 5da1da007e3026def7ec87b2b3462b6f18c66a98 parent da6b426689dc19ddc84ddab1ad6c1a6131064614 Author: Vincent Demeester <vincent@sbr.pm> Date: Fri, 17 Jan 2020 15:55:05 +0100 chos4: small update on where files are written 🏫 Signed-off-by: Vincent Demeester <vincent@sbr.pm> Diffstat:
M | pkgs/scripts/bin/chos4 | | | 16 | +++++++++------- |
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/pkgs/scripts/bin/chos4 b/pkgs/scripts/bin/chos4 @@ -4,13 +4,15 @@ set -e BASE_URL="https://osinstall.chmouel.com" -curl -s "${BASE_URL}/vincent/kubeadmin.password.gpg"|gpg --decrypt > ~/.kube/kubeadmin.password.os4 -curl -s "${BASE_URL}/vincent/webaccess.gpg"|gpg --decrypt > ~/.kube/webaccess.os4 -curl -s "${BASE_URL}/vincent/kubeconfig.gpg"|gpg --decrypt > ~/.kube/config.os4 && export KUBECONFIG=~/.kube/config.os4 - -if test -d $HOME/sync/work/chos4/; then - cp ~/.kube/*.os4 $HOME/sync/work/chos4/ -fi +curl -s "${BASE_URL}/vincent/kubeadmin.password.gpg"|gpg --decrypt > ~/sync/work/chos4/kubeadmin.password.os4 +curl -s "${BASE_URL}/vincent/webaccess.gpg"|gpg --decrypt > ~/sync/work/chos4/webaccess.os4 +curl -s "${BASE_URL}/vincent/kubeconfig.gpg"|gpg --decrypt > ~/sync/work/chos4/config.os4 && export KUBECONFIG=~/sync/work/chos4/config.os4 + +for file in kubeadmin.password.os4 webaccess.os4 config.os4; do + if test -d $HOME/.kube/$file; then + ln -s $HOME/sync/work/chos4/$file ~/.kube/$file + fi +done export KUBECONFIG=~/.kube/config.os4 oc login -u kubeadmin -p $(cat ~/.kube/kubeadmin.password.os4)