rust/src/tools/rust-installer
Matthias Krüger 2118667ffa
Rollup merge of #110188 - Nilstrieb:remove-remove-dir-all, r=jyn514
Remove orphaned remove_dir_all implementation from rust-installer

I have no idea why it's here, but it's not used at all.

r? Mark-Simulacrum
2023-04-12 17:04:32 +02:00
..
src Rollup merge of #110188 - Nilstrieb:remove-remove-dir-all, r=jyn514 2023-04-12 17:04:32 +02:00
test Directly import rust-installer submodule 2023-03-07 08:30:08 -05:00
.gitignore Directly import rust-installer submodule 2023-03-07 08:30:08 -05:00
Cargo.toml Remove orphaned remove_dir_all implementation from rust-installer 2023-04-11 14:23:31 +02:00
combine-installers.sh replace legacy copyright annotations in submodules 2023-03-09 12:24:47 +01:00
gen-install-script.sh replace legacy copyright annotations in submodules 2023-03-09 12:24:47 +01:00
gen-installer.sh replace legacy copyright annotations in submodules 2023-03-09 12:24:47 +01:00
install-template.sh replace legacy copyright annotations in submodules 2023-03-09 12:24:47 +01:00
make-tarballs.sh replace legacy copyright annotations in submodules 2023-03-09 12:24:47 +01:00
README.md Directly import rust-installer submodule 2023-03-07 08:30:08 -05:00
rust-installer-version Directly import rust-installer submodule 2023-03-07 08:30:08 -05:00
test.sh Add bootstrap support for rust-installer 2023-03-07 08:30:08 -05:00

Build Status

A generator for the install.sh script commonly used to install Rust in Unix environments. It is used By Rust, Cargo, and is intended to be used by a future combined installer of Rust + Cargo.

Usage

./gen-installer.sh --product-name=Rust \
                   --rel-manifest-dir=rustlib \
                   --success-message=Rust-is-ready-to-roll. \
                   --image-dir=./install-image \
                   --work-dir=./temp \
                   --output-dir=./dist \
                   --non-installed-overlay=./overlay \
                   --package-name=rustc-nightly-i686-apple-darwin \
                   --component-name=rustc \
                   --legacy-manifest-dirs=rustlib \
                   --bulk-dirs=share/doc

Or, to just generate the script.

./gen-install-script.sh --product-name=Rust \
                        --rel-manifest-dir=rustlib \
                        --success-message=Rust-is-ready-to-roll. \
                        --output-script=install.sh \
                        --legacy-manifest-dirs=rustlib

Note: the dashes in success-message are converted to spaces. The script's argument handling is broken with spaces.

To combine installers.

./combine-installers.sh --product-name=Rust \
                        --rel-manifest-dir=rustlib \
                        --success-message=Rust-is-ready-to-roll. \
                        --work-dir=./temp \
                        --output-dir=./dist \
                        --non-installed-overlay=./overlay \
                        --package-name=rustc-nightly-i686-apple-darwin \
                        --legacy-manifest-dirs=rustlib \
                        --input-tarballs=./rustc.tar.gz,cargo.tar.gz

Future work

  • Make install.sh not have to be customized, pull it's data from a config file.
  • Be more resiliant to installation failures, particularly if the disk is full.
  • Pre-install and post-uninstall scripts.
  • Allow components to depend on or contradict other components.
  • Sanity check that expected destination dirs (bin, lib, share exist)?
  • Add --docdir flag. Is there a standard name for this?
  • Remove empty directories on uninstall.
  • Detect mismatches in --prefix, --mandir, etc. in follow-on installs/uninstalls.
  • Fix argument handling for spaces.
  • Add --bindir.

License

This software is distributed under the terms of both the MIT license and/or the Apache License (Version 2.0), at your option.

See LICENSE-APACHE, LICENSE-MIT for details.