refactoring
This commit is contained in:
parent
a4a4744241
commit
4f5c85dbcc
|
@ -24,7 +24,7 @@ error() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
exit_if_empty() {
|
||||
exitIfEmpty() {
|
||||
if [ -z "$1" ]; then
|
||||
error "$2"
|
||||
fi
|
||||
|
@ -97,8 +97,8 @@ if [ $ERROR -eq 1 ]; then
|
|||
error "Invalid parameter\\n$(usage)"
|
||||
fi
|
||||
|
||||
exit_if_empty "$INPUT_FILE" "Input file is missing (-i)"
|
||||
exit_if_empty "$OUTPUT_FILE" "Output file is missing (-i)"
|
||||
exitIfEmpty "$INPUT_FILE" "Input file is missing (-i)"
|
||||
exitIfEmpty "$OUTPUT_FILE" "Output file is missing (-i)"
|
||||
|
||||
if [ ! -f "$INPUT_FILE" ]; then
|
||||
error "No such file: $INPUT_FILE"
|
||||
|
|
Loading…
Reference in a new issue