added usage()
This commit is contained in:
@@ -5,8 +5,23 @@ ICE_LOG="${2}"
|
||||
OUTFILE="${3}"
|
||||
TITLE="${4}
|
||||
|
||||
usage() {
|
||||
local name=${0##*/}
|
||||
|
||||
cat <<-EOF
|
||||
Usage: ${name} [-h || --help] <logfile>i <logfile2> <outfile> <title>
|
||||
|
||||
Generates graph of the <logfile> and <logfile2> and writes it to <outfile>
|
||||
EOF
|
||||
}
|
||||
|
||||
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
|
||||
usage
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "${ACTIVE_LOG}" ] || [ -z "${ICE_LOG}" ] || [ -z "${OUTFILE}" ]; then
|
||||
echo "Usage: $0 <temp_active.log> <temp_ice.log> <output.png>"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user