diff --git a/.scripts/powershell.ps1 b/.scripts/powershell.ps1 index ac706ba..9fce37a 100644 --- a/.scripts/powershell.ps1 +++ b/.scripts/powershell.ps1 @@ -42,9 +42,6 @@ try { } Write-Output "Downloading moonbit ..." Invoke-WebRequest -Uri $MoonbitUri -OutFile "${HOME}\moonbit.zip" - if (Test-Path -Path "$MoonHome\bin" -PathType Container) { - Remove-Item -Force -Recurse "$MoonHome\bin" - } if (Test-Path -Path "$MoonHome\lib" -PathType Container) { Remove-Item -Force -Recurse "$MoonHome\lib" } @@ -100,4 +97,4 @@ else { Write-Output "To verify the download binaries, check https://www.moonbitlang.com/download#verifying-binaries for instructions." -Write-Output "To know how to add shell completions, run 'moon shell-completion --help'" \ No newline at end of file +Write-Output "To know how to add shell completions, run 'moon shell-completion --help'" diff --git a/.scripts/unix.sh b/.scripts/unix.sh index 43bc828..bda83a2 100644 --- a/.scripts/unix.sh +++ b/.scripts/unix.sh @@ -126,9 +126,6 @@ echo "Downloading moonbit ..." curl --fail --location --progress-bar --output "$moonbit_dest" "$moonbit_uri" || error "Failed to download moonbit from \"$moonbit_uri\"" -rm -rf "${moon_home:?}/bin" || - error "Failed to remove existing moonbit binaries" - rm -rf "${moon_home:?}/lib" || error "Failed to remove existing moonbit libraries" @@ -174,15 +171,15 @@ rm -f "$core_dest" || echo "Bundling core ..." -PATH=$bin_dir $exe bundle --warn-list -a --all --source-dir "$lib_dir"/core || +PATH=$bin_dir $exe -C "$lib_dir"/core bundle --warn-list -a --all || error "Failed to bundle core" if [[ $version == "nightly" ]]; then - PATH=$bin_dir $exe bundle --warn-list -a --target llvm --source-dir "$lib_dir"/core || + PATH=$bin_dir $exe -C "$lib_dir"/core bundle --warn-list -a --target llvm || error "Failed to bundle core for llvm backend" fi -PATH=$bin_dir $exe bundle --warn-list -a --target wasm-gc --source-dir "$lib_dir"/core --quiet || +PATH=$bin_dir $exe -C "$lib_dir"/core bundle --warn-list -a --target wasm-gc --quiet || error "Failed to bundle core to wasm-gc" tildify() {