print help and version early

closes #267
This commit is contained in:
con-f-use 2020-12-19 00:21:58 +01:00 committed by GitHub
parent 3ddea20853
commit d63e4d1162
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

6
yadm
View File

@ -1401,6 +1401,12 @@ function process_global_args() {
while [[ $# -gt 0 ]] ; do
key="$1"
case $key in
-V|--version)
version
;;
-h|--help)
help
;;
-Y|--yadm-dir) # override the standard YADM_DIR
if [[ ! "$2" =~ ^/ ]] ; then
error_out "You must specify a fully qualified yadm directory"