Skip to content

Commit

Permalink
feat(binstall): error on missing glibc
Browse files Browse the repository at this point in the history
  • Loading branch information
EverlastingBugstopper committed Apr 30, 2021
1 parent 4a2a978 commit 247a431
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 160 deletions.
11 changes: 10 additions & 1 deletion installers/binstall/scripts/nix/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ download_binary_and_run_installer() {
*windows*)
_ext=".exe"
;;
*linux*)
need_glibc
;;
esac

local _tardir="rover-$DOWNLOAD_VERSION-${_arch}"
Expand Down Expand Up @@ -104,7 +107,7 @@ get_architecture() {

if [ "$_ostype" = Darwin -a "$_cputype" = arm64 ]; then
# Darwin `uname -s` doesn't seem to lie on Big Sur
# but we want to serve x86_64 binaries anyway that they can
# but we want to serve x86_64 binaries anyway so that they can
# then run in x86_64 emulation mode on their arm64 devices
local _cputype=x86_64
fi
Expand Down Expand Up @@ -154,6 +157,12 @@ err() {
exit 1
}

need_glibc() {
if ! check_cmd "/lib/x86_64-linux-gnu/libc.so.6"
then err "could not link against 'glibc'"
fi
}

need_cmd() {
if ! check_cmd "$1"
then err "need '$1' (command not found)"
Expand Down
150 changes: 0 additions & 150 deletions installers/binstall/scripts/nix/local-install.sh

This file was deleted.

16 changes: 9 additions & 7 deletions installers/binstall/scripts/windows/install.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Licensed under the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.

# This is just a little script that can be downloaded from the internet to
# install rover. It just downloads the installer and runs it.

# version found in Rover's Cargo.toml
# Note: this line is built automatically
# in build.rs. Don't touch it!
Expand Down Expand Up @@ -65,14 +73,8 @@ function Initialize-Environment() {
break
}

If (-Not (Get-Command 'curl')) {
Write-Error "The curl command is not installed on this machine. Please install curl before installing Rover"
# don't abort if invoked with iex that would close the PS session
If ($myinvocation.mycommand.commandtype -eq 'Script') { return } else { exit 1 }
}

If (-Not (Get-Command 'tar')) {
Write-Error "The tar command is not installed on this machine. Please install curl before installing Rover"
Write-Error "The tar command is not installed on this machine. Please install tar before installing Rover"
# don't abort if invoked with iex that would close the PS session
If ($myinvocation.mycommand.commandtype -eq 'Script') { return } else { exit 1 }
}
Expand Down
2 changes: 0 additions & 2 deletions installers/binstall/scripts/windows/local-install.ps1

This file was deleted.

0 comments on commit 247a431

Please sign in to comment.