diff --git a/src/cmd_fsck b/src/cmd_fsck index 65fbe7f..9ad1cdb 100644 --- a/src/cmd_fsck +++ b/src/cmd_fsck @@ -18,23 +18,23 @@ cmd_fsck() { [[ ! -f "${DB_FILE}" ]] && return 3 [[ ! -d "${GIT_DIR}/.git" ]] && return 2 + if [[ -z "${cmdList[@]}" ]]; then + chk_deployed_ids "${TARGET}" "${DB_FILE}" + chk_nonexistent_ids "${TARGET}" "${DB_FILE}" + chk_metadata "${GIT_DIR}" "${TARGET}" "${DB_FILE}" + fi + case ${cmdList[@]} in --deployed-ids) chk_deployed_ids "${TARGET}" "${DB_FILE}" ;; - --non-existent-ids) + --nonexistent-ids) chk_nonexistent_ids "${TARGET}" "${DB_FILE}" ;; --metadata) chk_metadata "${GIT_DIR}" "${TARGET}" "${DB_FILE}" ;; - - *) - chk_deployed_ids "${TARGET}" "${DB_FILE}" - chk_nonexistent_ids "${TARGET}" "${DB_FILE}" - chk_metadata "${GIT_DIR}" "${TARGET}" "${DB_FILE}" - ;; esac }