extract magic number into a variable

This commit is contained in:
Kunal Dabir 2018-11-16 12:12:37 +05:30
parent 79f3eb8bba
commit b60c239bc4
1 changed files with 7 additions and 2 deletions

9
has
View File

@ -177,9 +177,14 @@ else
__detect $cmd
done
## display found / total
# echo ${OK} / $(($OK+$KO))
if [[ "$KO" -gt "126" ]]; then
exit "126"
## max status code that can be returned
MAX_STATUS_CODE=126
if [[ "$KO" -gt "${MAX_STATUS_CODE}" ]]; then
exit "${MAX_STATUS_CODE}"
else
exit "${KO}"
fi