Added usage, usage_and_exit, version and error
This commit is contained in:
		@@ -28,3 +28,22 @@ exec_process_substitution () {
 | 
			
		||||
    printf '%s' "$__result"
 | 
			
		||||
    return $__result_code
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
usage () {
 | 
			
		||||
    echo "Usage: $PROGRAM [--file config] [--?] [--help] [--version] [--dbg]" 
 | 
			
		||||
    # UpdateController.conf"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
usage_and_exit () {
 | 
			
		||||
    usage
 | 
			
		||||
    exit $1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
version () {
 | 
			
		||||
    echo "$PROGRAM version $VERSION"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
error () {
 | 
			
		||||
    echo "$@" 1>&2
 | 
			
		||||
    usage_and_exit 1
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user