diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-05-11 23:10:27 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-11 23:10:27 -0300 |
| commit | e3d3e20dfea253de291d5b31059cd55c0eaabf02 (patch) | |
| tree | 82cf0d46ea3768171c8a87630cab5011d1ccf2a1 /run_tree.ps1 | |
| parent | 4fdf3392868c72ff4c33b70d165a177e97f2fece (diff) | |
| download | Sakura-e3d3e20dfea253de291d5b31059cd55c0eaabf02.tar.gz Sakura-e3d3e20dfea253de291d5b31059cd55c0eaabf02.zip | |
Multigroup unified reference for hierarchical access
Diffstat (limited to 'run_tree.ps1')
| -rw-r--r-- | run_tree.ps1 | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/run_tree.ps1 b/run_tree.ps1 new file mode 100644 index 0000000..7f74bac --- /dev/null +++ b/run_tree.ps1 @@ -0,0 +1,38 @@ +param( + [switch]$NoRun +) + +$ErrorActionPreference = "Stop" + +$repoRoot = $PSScriptRoot +$projectName = Split-Path -Leaf $repoRoot + +Push-Location $repoRoot +try { + (& opam env) -split '\r?\n' | ForEach-Object { + if ($_ -ne "") { + Invoke-Expression $_ + } + } + + dune build shared/shabptree/sakura_shabptree.dll bin/tree.exe + + $dll = @( + Get-ChildItem -Path $repoRoot -Filter sakura_shabptree.dll -Recurse -ErrorAction SilentlyContinue + Get-ChildItem -Path (Join-Path $repoRoot "..") -Filter sakura_shabptree.dll -Recurse -ErrorAction SilentlyContinue | + Where-Object { $_.FullName -like "*\_build\*\$projectName\shared\shabptree\sakura_shabptree.dll" } + ) | Select-Object -First 1 + + if ($null -eq $dll) { + throw "Could not find built sakura_shabptree.dll" + } + + $env:SAKURA_BPLUSTREE_DLL = $dll.FullName + + if (-not $NoRun) { + dune exec bin/tree.exe + } +} +finally { + Pop-Location +} |
