
&"$PSScriptRoot/vars.ps1"
&"$PSScriptRoot/check-administrator.ps1"

# download version scripts zip, extract and execute all sql (cleans up after)
&"$PHPexe" "$ROOT/src/bootstrap.php" upgrade:scripts --live --install

# now action the ps1 files
Get-ChildItem "$ROOT\Var\Upgrade\*.ps1" | ForEach-Object {
    $fName = $_.FullName
    Write-Host "Running ... $fName"
    &"$fName"
    [void](Remove-Item -Force "$fName")
}