Rename script from ghcup.sh to ghcup

This commit is contained in:
Julian Ospald 2018-09-30 01:17:14 +08:00
parent 40b62f83f3
commit 111a5d8be3
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
3 changed files with 12 additions and 12 deletions

View File

@ -3,14 +3,14 @@
set -e set -e
# install GHCs # install GHCs
./ghcup.sh -v install 8.2.2 ./ghcup -v install 8.2.2
./ghcup.sh -v install 8.4.3 ./ghcup -v install 8.4.3
./ghcup.sh -v install 8.6.1 ./ghcup -v install 8.6.1
# set GHC # set GHC
./ghcup.sh -v set 8.6.1 ./ghcup -v set 8.6.1
./ghcup.sh -v set 8.4.3 ./ghcup -v set 8.4.3
./ghcup.sh -v set 8.2.2 ./ghcup -v set 8.2.2
# install cabal-install # install cabal-install
wget https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-x86_64-unknown-linux.tar.gz wget https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-x86_64-unknown-linux.tar.gz

View File

@ -32,12 +32,12 @@ Inspired by [rustup](https://github.com/rust-lang-nursery/rustup.rs).
## Installation ## Installation
Just place `ghcup.sh` into your PATH anywhere Just place the `ghcup` shell script into your PATH anywhere
(preferably `~/.local/bin`). (preferably `~/.local/bin`).
## Usage ## Usage
See `ghcup.sh --help`. See `ghcup --help`.
## Contributing ## Contributing

View File

@ -96,7 +96,7 @@ ARGS:
self_update_usage() { self_update_usage() {
(>&2 echo "ghcup-self-update (>&2 echo "ghcup-self-update
Update the ghcup.sh script in-place Update the ghcup script in-place
USAGE: USAGE:
${SCRIPT} self-update [FLAGS] [TARGET-LOCATION] ${SCRIPT} self-update [FLAGS] [TARGET-LOCATION]
@ -361,7 +361,7 @@ set_ghc() {
self_update() { self_update() {
target_location=$1 target_location=$1
source_url="https://raw.githubusercontent.com/hasufell/ghcup/master/ghcup.sh" source_url="https://raw.githubusercontent.com/hasufell/ghcup/master/ghcup"
downloader=curl downloader=curl
downloader_opts="--fail -O" downloader_opts="--fail -O"
@ -375,8 +375,8 @@ self_update() {
echov "Downloading ${source_url}" echov "Downloading ${source_url}"
# shellcheck disable=SC2086 # shellcheck disable=SC2086
edo ${downloader} ${downloader_opts} "${source_url}" edo ${downloader} ${downloader_opts} "${source_url}"
edo mv ghcup.sh "${target_location}"/ghcup.sh edo mv ghcup "${target_location}"/ghcup
edo chmod +x "${target_location}"/ghcup.sh edo chmod +x "${target_location}"/ghcup
) )
printf_green "Done, make sure \"${target_location}\" is in your PATH!" printf_green "Done, make sure \"${target_location}\" is in your PATH!"