Add version print options
This commit is contained in:
		
							parent
							
								
									61dae13b55
								
							
						
					
					
						commit
						bddefc4778
					
				@ -63,7 +63,7 @@ fi
 | 
			
		||||
 | 
			
		||||
# Print the help for this command.
 | 
			
		||||
print_help() {
 | 
			
		||||
    echo "Mirror Sync"
 | 
			
		||||
    echo "Mirror Sync (${VERSION})"
 | 
			
		||||
    echo
 | 
			
		||||
    echo "Usage:"
 | 
			
		||||
    echo "$0 [--help|--update-support-utilities] {module} [--force]"
 | 
			
		||||
@ -1199,6 +1199,11 @@ while (( $# > 0 )); do
 | 
			
		||||
        -h|h|help|--help)
 | 
			
		||||
            print_help "$@"
 | 
			
		||||
        ;;
 | 
			
		||||
        # Print version.
 | 
			
		||||
        -v|--version)
 | 
			
		||||
            echo "Mirror Sync (${VERSION})"
 | 
			
		||||
            exit 0
 | 
			
		||||
        ;;
 | 
			
		||||
        # Default to rsync if module has no special options, otherwise if no module is found give help.
 | 
			
		||||
        *)
 | 
			
		||||
            for MODULE in ${MODULES:?}; do
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user