Pass the project path in to the installation script
This commit is contained in:
parent
2cf4a15f27
commit
c7efcdec73
2 changed files with 23 additions and 12 deletions
|
@ -9,7 +9,13 @@ begin
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function mkWinPath
|
||||||
|
sed "s/\//\\\\/g"
|
||||||
|
end
|
||||||
|
|
||||||
set -l setupLabel "winiso-valhalla"
|
set -l setupLabel "winiso-valhalla"
|
||||||
|
set -l projectPath "PortValhalla"
|
||||||
|
set -l localProjectPath "sources/\$OEM\$/\$1/$projectPath"
|
||||||
set -l buildDir "$(status dirname)/build"
|
set -l buildDir "$(status dirname)/build"
|
||||||
set -l cacheDir ~/.cache/winiso-valhalla
|
set -l cacheDir ~/.cache/winiso-valhalla
|
||||||
set -l isoFile "$buildDir/winiso-valhalla.iso"
|
set -l isoFile "$buildDir/winiso-valhalla.iso"
|
||||||
|
@ -66,7 +72,7 @@ begin
|
||||||
set -l url "$entry[2]"
|
set -l url "$entry[2]"
|
||||||
set -l type "$entry[3]"
|
set -l type "$entry[3]"
|
||||||
set -l dir "$entry[4]"
|
set -l dir "$entry[4]"
|
||||||
set -l winPath "X:\\$(echo "$name" | sed "s/\//\\\\/g")"
|
set -l winPath "X:\\$(echo "$name" | mkWinPath)"
|
||||||
set -l file "$cacheDir/$name.$type"
|
set -l file "$cacheDir/$name.$type"
|
||||||
set -l target "$winpeOverlay/$name"
|
set -l target "$winpeOverlay/$name"
|
||||||
|
|
||||||
|
@ -119,13 +125,15 @@ begin
|
||||||
end
|
end
|
||||||
|
|
||||||
printf %s\n \
|
printf %s\n \
|
||||||
"@echo off" \
|
"@echo off" (
|
||||||
"echo Loading Drivers..." (
|
|
||||||
string join ";" \
|
string join ";" \
|
||||||
"set PATH=%PATH%" \
|
"set PATH=%PATH%" \
|
||||||
$path \
|
$path \
|
||||||
"$git[4]\\bin"
|
"$git[4]\\bin"
|
||||||
) \
|
) \
|
||||||
|
"set LOCAL_PROJECT_PATH=$(echo "$localProjectPath" | mkWinPath)" \
|
||||||
|
"set REMOTE_PROJECT_PATH=$(echo "$projectPath" | mkWinPath)" \
|
||||||
|
"echo Loading Drivers..." \
|
||||||
'pwsh -file "X:\Scripts\Drivers.ps1"' \
|
'pwsh -file "X:\Scripts\Drivers.ps1"' \
|
||||||
"echo Configuring Network..." \
|
"echo Configuring Network..." \
|
||||||
"wpeinit" \
|
"wpeinit" \
|
||||||
|
@ -159,13 +167,18 @@ begin
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
set -l sourceDir "$winOverlay/sources"
|
set -l projectPath "$winOverlay/$localProjectPath"
|
||||||
set -l projectPath "$sourceDir/\$OEM\$/\$1/PortValhalla"
|
set -l rootDir "$projectPath"
|
||||||
chmod u+w "$sourceDir"
|
|
||||||
|
while [ ! -d "$rootDir" ]
|
||||||
|
set rootDir (dirname "$rootDir")
|
||||||
|
end
|
||||||
|
|
||||||
|
chmod u+w "$rootDir"
|
||||||
mkdir -p "$projectPath"
|
mkdir -p "$projectPath"
|
||||||
source "$dir/../scripts/copy-repo.fish" "$projectPath"
|
source "$dir/../scripts/copy-repo.fish" "$projectPath"
|
||||||
rm -rf "$projectPath/archiso"
|
rm -rf "$projectPath/archiso"
|
||||||
chmod -R u-w "$sourceDir"
|
chmod -R u-w "$rootDir"
|
||||||
end
|
end
|
||||||
|
|
||||||
sudo mount --mkdir -t overlay overlay -o lowerdir="$winOverlay":"$winpePath":"$winPath",upperdir="$upperDir",workdir="$workDir" "$valhallaPath"
|
sudo mount --mkdir -t overlay overlay -o lowerdir="$winOverlay":"$winpePath":"$winPath",upperdir="$upperDir",workdir="$workDir" "$valhallaPath"
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
$null = $env:WIN_COMPUTER_NAME;
|
$drives = & wmic volume get "DriveLetter,Label";
|
||||||
$null = $env:SETUP_SCRIPT_NAME;
|
$drive = $($($drives | Select-String -Pattern "winiso-valhalla") -split "\s+")[0];
|
||||||
|
Set-Location (Join-Path $drive $env:LOCAL_PROJECT_PATH)
|
||||||
git clone https://git.nuth.ch/manuth/PortValhalla.git;
|
|
||||||
Set-Location PortValhalla;
|
|
||||||
|
|
Loading…
Reference in a new issue