Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .scripts/powershell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ if ($env:MOON_HOME) {

$MoonBin = "${MoonHome}\bin"
$MoonLib = "${MoonHome}\lib"
$MoonExe = "${MoonBin}\moon.exe"
$MoonxExe = "${MoonBin}\moonx.exe"

$CLI_MOONBIT = "https://cli.moonbitlang.com"

Expand Down Expand Up @@ -51,6 +53,10 @@ try {
Remove-Item -Force -Recurse "$MoonHome\include"
}
Expand-Archive "${HOME}\moonbit.zip" -DestinationPath $MoonHome -Force
if (Test-Path -LiteralPath $MoonxExe) {
Remove-Item -Force -LiteralPath $MoonxExe
}
New-Item -ItemType HardLink -Path $MoonxExe -Value $MoonExe | Out-Null
Remove-Item -Force "${HOME}\moonbit.zip"

Write-Output "Downloading core ..."
Expand Down
3 changes: 3 additions & 0 deletions .scripts/unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ rm -rf "${moon_home:?}/include" ||
tar xf "$moonbit_dest" --directory="$moon_home" ||
error "Failed to extract moonbit to \"$moon_home\""

ln -sfn moon "$bin_dir/moonx" ||
error "Failed to link \"$bin_dir/moonx\" to \"$exe\""

rm -f "$moonbit_dest" ||
error "Failed to remove \"$moonbit_dest\""

Expand Down