1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-01 20:43:34 +02:00

home-manager: look for '--help' on command line

This is a special case to work around the lack of long options in
`getopts`.
This commit is contained in:
Robert Helgesson 2017-11-12 14:11:59 +01:00
parent 66219f23bb
commit 04ea044917
No known key found for this signature in database
GPG Key ID: C3DB11069E65DC86

View File

@ -296,6 +296,15 @@ function doHelp() {
EXTRA_NIX_PATH=()
HOME_MANAGER_CONFIG_ATTRIBUTE=""
# As a special case, if the user has given --help anywhere on the
# command line then print help and exit.
for arg in "$@"; do
if [[ $arg == "--help" ]]; then
doHelp
exit 0
fi
done
while getopts f:I:A:vnh opt; do
case $opt in
f)