Compare commits

...

2 Commits

Author SHA1 Message Date
Jeremy Soller a55ed115f5 Merge branch 'bootstrap_install_cargo_config' into 'master'
Install cargo-config from bootstrap script

See merge request redox-os/redox!1230
2020-02-15 15:19:04 +00:00
Coleman McFarland b82213baa6 Install cargo-config from bootstrap script
Some cookbook entries were failing with an error like this:

```
error: no such subcommand: `config`
```

We can install this subcommand from the bootstrap script, and also
instruct folks in the README to do so manually.
2020-02-15 08:36:29 -05:00
2 changed files with 16 additions and 7 deletions

View File

@ -138,8 +138,8 @@ $ ./bootstrap.sh -d
$ curl https://sh.rustup.rs -sSf | sh $ curl https://sh.rustup.rs -sSf | sh
$ source $HOME/.cargo/env $ source $HOME/.cargo/env
# Install the sysroot manager Xargo # Install the sysroot manager Xargo and cargo-config
$ cargo install xargo $ cargo install xargo cargo-config
# For successive builds start here. If this is your first build, just continue # For successive builds start here. If this is your first build, just continue

View File

@ -371,6 +371,18 @@ usage()
exit exit
} }
#############################################################
# Looks for and installs a cargo-managed binary or subcommand
#############################################################
cargoInstall() {
if [[ "`cargo install --list`" != *"$1"* ]]; then
cargo install $1
else
echo "You have $1 installed already!"
fi
}
#################################################################################### ####################################################################################
# This function takes care of everything associated to rust, and the version manager # This function takes care of everything associated to rust, and the version manager
# That controls it, it can install rustup and uninstall multirust as well as making # That controls it, it can install rustup and uninstall multirust as well as making
@ -481,11 +493,8 @@ boot()
echo "Cloning gitlab repo..." echo "Cloning gitlab repo..."
git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive
rustInstall rustInstall
if [[ "`cargo install --list`" != *"xargo"* ]]; then cargoInstall cargo-config
cargo install xargo cargoInstall xargo
else
echo "You have xargo installed already!"
fi
echo "Cleaning up..." echo "Cleaning up..."
rm bootstrap.sh rm bootstrap.sh
echo echo