[cmd_fsck] Fixed command use

This commit is contained in:
ayakael 2018-04-15 22:13:19 -04:00
parent ff71d6530d
commit 6b047c87f9
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -18,23 +18,23 @@ cmd_fsck() {
[[ ! -f "${DB_FILE}" ]] && return 3 [[ ! -f "${DB_FILE}" ]] && return 3
[[ ! -d "${GIT_DIR}/.git" ]] && return 2 [[ ! -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 case ${cmdList[@]} in
--deployed-ids) --deployed-ids)
chk_deployed_ids "${TARGET}" "${DB_FILE}" chk_deployed_ids "${TARGET}" "${DB_FILE}"
;; ;;
--non-existent-ids) --nonexistent-ids)
chk_nonexistent_ids "${TARGET}" "${DB_FILE}" chk_nonexistent_ids "${TARGET}" "${DB_FILE}"
;; ;;
--metadata) --metadata)
chk_metadata "${GIT_DIR}" "${TARGET}" "${DB_FILE}" 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 esac
} }