From b75932cbb45dd321aa36a5babe586ac7a47af339 Mon Sep 17 00:00:00 2001 From: Owen Jones <owen.jones@uwe.ac.uk> Date: Tue, 8 Oct 2024 12:19:58 +0000 Subject: [PATCH] return to retro batch uppercase style, and some thoughts for the future --- quick-connect.bat | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/quick-connect.bat b/quick-connect.bat index 26aceaf..926791f 100644 --- a/quick-connect.bat +++ b/quick-connect.bat @@ -1,11 +1,15 @@ -@echo off -call az config set core.login_experience_v2=off -call az login +@ECHO OFF -if exist "C:\Users\%username%\.ssh\csctcloud\" ( +REM can we check here if az has a valid token and skip? +CALL az config set core.login_experience_v2=off +CALL az login + +IF EXIST "C:\Users\%username%\.ssh\csctcloud\" ( del /q "C:\Users\%username%\.ssh\csctcloud" rmdir "C:\Users\%username%\.ssh\csctcloud" ) -call az ssh config --ip csctcloud.uwe.ac.uk --file "C:\Users\%username%\.ssh\config" --keys-destination-folder "C:\Users\%username%\.ssh\csctcloud" -call code -n --remote ssh-remote+csctcloud.uwe.ac.uk \ No newline at end of file +REM can we check here if certificate is still valid and/or if config has entry, and skip? (or combination of this?) +CALL az ssh config --ip csctcloud.uwe.ac.uk --file "C:\Users\%username%\.ssh\config" --keys-destination-folder "C:\Users\%username%\.ssh\csctcloud" + +CALL code -n --remote ssh-remote+csctcloud.uwe.ac.uk \ No newline at end of file -- GitLab