Add --help to installer
This commit is contained in:
parent
7ee46cb003
commit
71f44d3ac7
11
install.zsh
11
install.zsh
|
@ -91,7 +91,7 @@ install_prog() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -z $1 ]]; then
|
usage() {
|
||||||
<<-HELP
|
<<-HELP
|
||||||
Usage: $0 [opts] <program_names>
|
Usage: $0 [opts] <program_names>
|
||||||
Options:
|
Options:
|
||||||
|
@ -103,10 +103,15 @@ if [[ -z $1 ]]; then
|
||||||
--no-flatpak do not automatically install flatpak deps (still checks for them)
|
--no-flatpak do not automatically install flatpak deps (still checks for them)
|
||||||
HELP
|
HELP
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
}
|
||||||
|
|
||||||
|
[[ -z $1 ]] && usage
|
||||||
|
|
||||||
zparseopts -D -E p:=install_path -path:=install_path f=force -force=force \
|
zparseopts -D -E p:=install_path -path:=install_path f=force -force=force \
|
||||||
s=skip -skip=skip -no-flatpak=noflatpakinstall a=all -all=all l=list -list=list
|
s=skip -skip=skip -no-flatpak=noflatpakinstall a=all -all=all l=list -list=list -help=help h=help
|
||||||
|
|
||||||
|
[[ $help ]] && usage
|
||||||
|
|
||||||
|
|
||||||
if [[ ! $install_path ]]; then
|
if [[ ! $install_path ]]; then
|
||||||
install_path=$HOME/.local/bin
|
install_path=$HOME/.local/bin
|
||||||
|
|
Loading…
Reference in a new issue