[parser] fsck options can not be put after or before target

This commit is contained in:
ayakael 2018-04-15 22:32:21 -04:00
parent c8f81c2ecd
commit d137ace072
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -106,6 +106,11 @@ case "${1}" in
;;
*)
TARGET="${1}"
shift
;;
"")
break 2
;;
@ -114,7 +119,7 @@ case "${1}" in
[[ -z ${cmdList[@]} ]] && cmdList=(deployed-ids nonexistent-ids metadata)
cmd_fsck "${GIT_DIR}" "${@}" ${cmdList[@]}
cmd_fsck "${GIT_DIR}" "${TARGET}" ${cmdList[@]}
EXIT=$?
[[ ${EXIT} -eq 3 ]] && echo "Database file non-existent"
[[ ${EXIT} -eq 2 ]] && echo "Git directory not a valid git repository"