forked from enderofwings/NexusOS
Sync from upstream: ncp.ps1 works under PowerShell on Linux
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -73,6 +73,20 @@ EOF
|
||||
echo "Registered promethean in ~/.bashrc."
|
||||
fi
|
||||
|
||||
# Same ncp inside PowerShell, if pwsh is installed here. bash functions are
|
||||
# invisible to pwsh, so without this `ncp` is "not recognized" there even
|
||||
# though it works in bash. install-windows.ps1 does this on the Windows side;
|
||||
# this profile lives outside the repo, so a restore has to re-add it.
|
||||
if command -v pwsh >/dev/null; then
|
||||
ps_profile="$HOME/.config/powershell/profile.ps1"
|
||||
if ! grep -q "NexusOS ncp" "$ps_profile" 2>/dev/null; then
|
||||
mkdir -p "$(dirname "$ps_profile")"
|
||||
printf '\n# NexusOS ncp\nfunction ncp { & "%s/management/ncp.ps1" @args }\n' \
|
||||
"$NEXUS_ROOT" >> "$ps_profile"
|
||||
echo "Registered ncp in $ps_profile."
|
||||
fi
|
||||
fi
|
||||
|
||||
# The AMD box runs CPU-only (Vega 20, 4GB VRAM thrashes). An NVIDIA box should not.
|
||||
if command -v nvidia-smi >/dev/null && command -v sqlite3 >/dev/null && \
|
||||
[ "$(sqlite3 "$NEXUS_ROOT/synapse/memory/memory.db" \
|
||||
|
||||
Reference in New Issue
Block a user