I noticed a couple of inconsistencies when reading through the install bash scripts.
- Make documentation for switches consistent over all files.
- Replace all `sed` implementations of `lowercase` with a more maintainable `tr` implementation.
- Set the `OS` variable in every install script, making it so previously unused checks are actually used.
- Exit with a non-zero exit code when the script reaches an illegal state.
## PR Context
A lot of people, including myself, read the install scripts before executing them. While doing so I noticed they contained inconsistencies. For example, certain flags you can pass to the install script were either undocumented or had an incorrect description. This PR fixes some of these inconsistencies, which should make them easier to maintain and easier to read.
Co-authored-by: Travis Plunk <github@ez13.net>
-preview switch:
- installs pwsh-preview packages when a package manager is being used.
- uses link name pwsh-preview when tar ball install is being done
- results in preview release being available for calling manually, but does not become systemwide version
Issue #7177
Fixed#6815 by adding -allowprereleases parameter
Fixed#6405 by adding -allowprereleases parameter
Added parameters to documentation
Ready for prerelease repositories if Microsoft starts providing them
Added -skip-sudo-check for all distros
Fixed -interactivetesting should do nothing if -includeide was not used
The comparison to test if we were using sudo was failing when running as root. We would then run -v, and get a bad error message. fixing the comparison.
- Update `installpsh-suse.sh` to work with the .tar.gz binary archive.
- Remove `download.sh` as it's not used anywhere now. (checked with PowerShellGet and OneGet, they are using a local copy of download.sh).
updating for pull request comments
OSX Install script updated to use repositories
Using TR, use curl rather than wget since we ensured it is on the system
Update comments in install-powershell.sh
install-powershell.sh