Add --help to installer

This commit is contained in:
Alexander Gehrke 2024-04-04 13:39:05 +02:00
parent 7ee46cb003
commit 71f44d3ac7

View file

@ -91,7 +91,7 @@ install_prog() {
fi
}
if [[ -z $1 ]]; then
usage() {
<<-HELP
Usage: $0 [opts] <program_names>
Options:
@ -103,10 +103,15 @@ if [[ -z $1 ]]; then
--no-flatpak do not automatically install flatpak deps (still checks for them)
HELP
exit 1
fi
}
[[ -z $1 ]] && usage
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
install_path=$HOME/.local/bin