Pass label of setup disk as variable

This commit is contained in:
Manuel Thalmann 2024-07-26 14:46:58 +02:00
parent 2165ea0296
commit e30b48204f
2 changed files with 3 additions and 2 deletions

View file

@ -131,6 +131,7 @@ begin
$path \ $path \
"$git[4]\\bin" "$git[4]\\bin"
) \ ) \
"set SETUP_LABEL=$setupLabel" \
"set LOCAL_PROJECT_PATH=$(echo "$localProjectPath" | mkWinPath)" \ "set LOCAL_PROJECT_PATH=$(echo "$localProjectPath" | mkWinPath)" \
"set REMOTE_PROJECT_PATH=$(echo "$projectPath" | mkWinPath)" \ "set REMOTE_PROJECT_PATH=$(echo "$projectPath" | mkWinPath)" \
"echo Loading Drivers..." \ "echo Loading Drivers..." \

View file

@ -1,3 +1,3 @@
$drives = & wmic volume get "DriveLetter,Label"; $drives = & wmic volume get "DriveLetter,Label";
$env:INSTALLER_DRIVE = $($($drives | Select-String -Pattern "winiso-valhalla") -split "\s+")[0]; $env:SETUP_DRIVE = $($($drives | Select-String -Pattern "$env:SETUP_LABEL") -split "\s+")[0];
Set-Location (Join-Path $env:INSTALLER_DRIVE $env:LOCAL_PROJECT_PATH) Set-Location (Join-Path $env:SETUP_DRIVE $env:LOCAL_PROJECT_PATH)