From 6b047c87f90837a926715ef609f5c4b8ef6cb8fc Mon Sep 17 00:00:00 2001 From: ayakael Date: Sun, 15 Apr 2018 22:13:19 -0400 Subject: [PATCH] [cmd_fsck] Fixed command use --- src/cmd_fsck | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 }