Skip to content

Commit

Permalink
Install cargo-config from bootstrap script
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dontlaugh committed Feb 15, 2020
1 parent a6d3efa commit b82213b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ $ ./bootstrap.sh -d
$ curl https://sh.rustup.rs -sSf | sh
$ source $HOME/.cargo/env

# Install the sysroot manager Xargo
$ cargo install xargo
# Install the sysroot manager Xargo and cargo-config
$ cargo install xargo cargo-config

# For successive builds start here. If this is your first build, just continue

Expand Down
19 changes: 14 additions & 5 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,18 @@ usage()
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
# That controls it, it can install rustup and uninstall multirust as well as making
Expand Down Expand Up @@ -481,11 +493,8 @@ boot()
echo "Cloning gitlab repo..."
git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive
rustInstall
if [[ "`cargo install --list`" != *"xargo"* ]]; then
cargo install xargo
else
echo "You have xargo installed already!"
fi
cargoInstall cargo-config
cargoInstall xargo
echo "Cleaning up..."
rm bootstrap.sh
echo
Expand Down

0 comments on commit b82213b

Please sign in to comment.