mirror of
https://github.com/esp-rs/espup.git
synced 2025-09-28 05:10:44 +00:00
Merge pull request #5 from SergioGasquez/fix/docs-spellcheck
docs: 📝 Run cargo-spellcheck to fix docs typos
This commit is contained in:
commit
5d8b038a76
@ -158,7 +158,7 @@ impl EspIdfRepo {
|
||||
Ok(exports)
|
||||
}
|
||||
|
||||
/// Create a new instance with the propper arguments.
|
||||
/// Create a new instance with the proper arguments.
|
||||
pub fn new(version: &str, minified: bool, targets: HashSet<Target>) -> EspIdfRepo {
|
||||
let install_path = PathBuf::from(get_tools_path());
|
||||
debug!(
|
||||
@ -194,20 +194,20 @@ pub fn get_install_path(repo: EspIdfRemote) -> PathBuf {
|
||||
install_path
|
||||
}
|
||||
|
||||
/// Gets path where esp-idf tools where be downloaded and installed. If enviroment
|
||||
/// Gets path where esp-idf tools where be downloaded and installed. If environment
|
||||
/// variable IDF_TOOLS_PATH is not set. Uses HOME/.espressif on Linux and macOS,
|
||||
/// and %USER_PROFILE%\.espressif on Windows.
|
||||
pub fn get_tools_path() -> String {
|
||||
env::var("IDF_TOOLS_PATH").unwrap_or_else(|_e| get_home_dir() + "/.espressif")
|
||||
}
|
||||
|
||||
/// Gets the espressif tools directory path. Tools direcotry is where the tools
|
||||
/// Gets the espressif tools directory path. Tools directory is where the tools
|
||||
/// are extracted.
|
||||
pub fn get_tool_path(tool_name: &str) -> String {
|
||||
format!("{}/tools/{}", get_tools_path(), tool_name)
|
||||
}
|
||||
|
||||
/// Gets the espressif dist directory path. Dist directory is where the archives
|
||||
/// Gets the Espressif dist directory path. Dist directory is where the archives
|
||||
/// of the tools are downloaded.
|
||||
pub fn get_dist_path(tool_name: &str) -> String {
|
||||
let tools_path = get_tools_path();
|
||||
|
@ -16,11 +16,11 @@ const DEFAULT_XTENSA_RUST_REPOSITORY: &str =
|
||||
pub struct RustToolchain {
|
||||
/// Xtensa Rust toolchain file.
|
||||
pub dist_file: String,
|
||||
/// Xtensa Rust toolchain url.
|
||||
/// Xtensa Rust toolchain URL.
|
||||
pub dist_url: String,
|
||||
/// Xtensa Src Rust toolchain file.
|
||||
pub src_dist_file: String,
|
||||
/// Xtensa Src Rust toolchain url.
|
||||
/// Xtensa Src Rust toolchain URL.
|
||||
pub src_dist_url: String,
|
||||
/// Path to the cargo home directory.
|
||||
pub cargo_home: PathBuf,
|
||||
@ -285,7 +285,7 @@ fn get_installer(host_triple: &str) -> &str {
|
||||
}
|
||||
}
|
||||
|
||||
/// Checks if rustup and the propper nightly version are installed. If they are
|
||||
/// Checks if rustup and the proper nightly version are installed. If they are
|
||||
/// not, proceed to install them.
|
||||
pub fn check_rust_installation(nightly_version: &str) -> Result<()> {
|
||||
info!("{} Checking existing Rust installation", emoji::WRENCH);
|
||||
@ -404,7 +404,7 @@ pub fn install_riscv_target(nightly_version: &str) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Installs the dessired version of the nightly toolchain.
|
||||
/// Installs the desired version of the nightly toolchain.
|
||||
fn install_rust_nightly(version: &str) -> Result<()> {
|
||||
info!("{} Installing {} toolchain", emoji::WRENCH, version);
|
||||
cmd!(
|
||||
|
@ -113,7 +113,7 @@ pub fn download_file(
|
||||
Ok(format!("{}/{}", output_directory, file_name))
|
||||
}
|
||||
|
||||
/// Creates the export file with the neccesary environment variables.
|
||||
/// Creates the export file with the necessary environment variables.
|
||||
pub fn export_environment(export_file: &PathBuf, exports: &[String]) -> Result<()> {
|
||||
info!("{} Creating export file", emoji::WRENCH);
|
||||
let mut file = File::create(export_file)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user