Minor code cleanup
This commit is contained in:
parent
0c351f42ae
commit
0b438f91ba
1 changed files with 2 additions and 6 deletions
|
|
@ -30,14 +30,10 @@ check_input() {
|
||||||
if [[ ! -e "${input_file}" ]]; then
|
if [[ ! -e "${input_file}" ]]; then
|
||||||
echo "ERROR: Input file '${input_file}' does not exist"
|
echo "ERROR: Input file '${input_file}' does not exist"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
elif [[ -z "${archive_pwd}" ]]; then
|
||||||
|
|
||||||
if [[ -z "${archive_pwd}" ]]; then
|
|
||||||
echo "ERROR: No password given"
|
echo "ERROR: No password given"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
elif [[ ! "$size" =~ ^([1-9][0-9]*)?$ ]]; then
|
||||||
|
|
||||||
if ! [[ "$size" =~ ^([1-9][0-9]*)?$ ]]; then
|
|
||||||
echo "Invalid size $size, must be empty or a positive number"
|
echo "Invalid size $size, must be empty or a positive number"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue