Rename 'set-ghc' subcommand to 'set'
This commit is contained in:
parent
144994fb1c
commit
b4ea850e15
14
ghcup.sh
14
ghcup.sh
@ -28,7 +28,7 @@ FLAGS:
|
|||||||
|
|
||||||
SUBCOMMANDS:
|
SUBCOMMANDS:
|
||||||
install Install GHC
|
install Install GHC
|
||||||
set-ghc Set current GHC version
|
set Set currently active GHC version
|
||||||
self-update Update this script in-place
|
self-update Update this script in-place
|
||||||
")
|
")
|
||||||
exit 1
|
exit 1
|
||||||
@ -51,12 +51,12 @@ ARGS:
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
set_ghc_usage() {
|
set_usage() {
|
||||||
(>&2 echo "ghcup-set-ghc
|
(>&2 echo "ghcup-set
|
||||||
Set the currently active GHC to the specified version
|
Set the currently active GHC to the specified version
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
${SCRIPT} set-ghc [FLAGS] <VERSION>
|
${SCRIPT} set [FLAGS] <VERSION>
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help Prints help information
|
-h, --help Prints help information
|
||||||
@ -348,16 +348,16 @@ while [ $# -gt 0 ] ; do
|
|||||||
[ "${GHC_VER}" ] || install_usage
|
[ "${GHC_VER}" ] || install_usage
|
||||||
install_ghc ${GHC_VER}
|
install_ghc ${GHC_VER}
|
||||||
break;;
|
break;;
|
||||||
set-ghc)
|
set)
|
||||||
shift 1
|
shift 1
|
||||||
while [ $# -gt 0 ] ; do
|
while [ $# -gt 0 ] ; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-h|--help) set_ghc_usage;;
|
-h|--help) set_usage;;
|
||||||
*) GHC_VER=$1
|
*) GHC_VER=$1
|
||||||
break;;
|
break;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
[ "${GHC_VER}" ] || set_ghc_usage
|
[ "${GHC_VER}" ] || set_usage
|
||||||
set_ghc ${GHC_VER}
|
set_ghc ${GHC_VER}
|
||||||
break;;
|
break;;
|
||||||
self-update)
|
self-update)
|
||||||
|
Loading…
Reference in New Issue
Block a user