Skip to content

Commit

Permalink
Add probe and var for file
Browse files Browse the repository at this point in the history
Was testing rustup on a very minimal Debian installation and got errors during the install process (error occurred in `install.sh` of the Rust nightly.)

Noticed that Rustup was downloading the i686 nightly instead of x86-64. Installing `file` fixed the problem, and this patch adds the probe to ensure file is installed before attempting to use it.

There may still be an issue with the i686 installation, I did not investigate further.
  • Loading branch information
AaronFriel committed Dec 16, 2014
1 parent b497f05 commit 4ecad89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/etc/rustup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ validate_opt() {

probe_need CFG_CURL curl
probe_need CFG_TAR tar
probe_need CFG_FILE file

CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
CFG_SELF="$0"
Expand Down Expand Up @@ -359,7 +360,7 @@ esac
# Detect 64 bit linux systems with 32 bit userland and force 32 bit compilation
if [ $CFG_OSTYPE = unknown-linux-gnu -a $CFG_CPUTYPE = x86_64 ]
then
file -L "$SHELL" | grep -q "x86[_-]64"
"${CFG_FILE}" -L "$SHELL" | grep -q "x86[_-]64"
if [ $? != 0 ]; then
CFG_CPUTYPE=i686
fi
Expand Down

0 comments on commit 4ecad89

Please sign in to comment.