From 620a482da1941b8fc892b1d43bed1dab11c625fb Mon Sep 17 00:00:00 2001 From: bfren Date: Sat, 21 Oct 2023 19:47:17 +0100 Subject: [PATCH] Saving ASPNET_RUNTIME variable --- overlay/etc/bf/init.d/11-version.nu | 2 +- overlay/tmp/install | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/overlay/etc/bf/init.d/11-version.nu b/overlay/etc/bf/init.d/11-version.nu index 271a140..febebf7 100644 --- a/overlay/etc/bf/init.d/11-version.nu +++ b/overlay/etc/bf/init.d/11-version.nu @@ -4,7 +4,7 @@ bf env load # Get installed version of ASP.NET runtime def main [] { # get the installed version ot ASP.NET - let version = glob /usr/share/dotnet/shared/Microsoft.NETCore.App/* + let version = glob $"(bf env ASPNET_RUNTIME)/*" if ($version | length) != 1 { bf write error "Unable to determine ASP.NET version." } # output version diff --git a/overlay/tmp/install b/overlay/tmp/install index 90c4b1d..98e7f6d 100644 --- a/overlay/tmp/install +++ b/overlay/tmp/install @@ -77,6 +77,9 @@ def main [] { if not ($"($dotnet_dir)/($aspnet_dir)/($aspnet_build)" | path exists) { bf write error " .. error installing ASP.NET runtime." } + + # save ASP.NET directory + bf env set ASPNET_RUNTIME $"($dotnet_dir)/($aspnet_dir)" } # Get the major version from a revision (i.e. get the first character)