[parser] [cmd_fsck] Added fsck command to check integrity of db file
This commit is contained in:
parent
1fc797418e
commit
1e2d22cfbb
2 changed files with 27 additions and 0 deletions
22
src/cmd_fsck
Normal file
22
src/cmd_fsck
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
# doc cmd_fsck {
|
||||
#
|
||||
# DESCRIPTION
|
||||
# cmd_fsck - Does series of tests on target's database file
|
||||
#
|
||||
# USAGE
|
||||
# cmd_fsck </path/to/git/dir> </path/to/target/dir>
|
||||
#
|
||||
# }
|
||||
|
||||
cmd_fsck() {
|
||||
local GIT_DIR="${1}"
|
||||
local TARGET="${2}"
|
||||
local DB_FILE="${TARGET}/${_OPT_DB_FILE}"
|
||||
|
||||
chk_deployed_ids "${TARGET}" "${DB_FILE}"
|
||||
chk_nonexistent_ids "${TARGET}" "${DB_FILE}"
|
||||
chk_metadata "${GIT_DIR}" "${TARGET}" "${DB_FILE}"
|
||||
|
||||
}
|
|
@ -29,5 +29,10 @@ case "${1}" in
|
|||
shift
|
||||
cmd_du "${@}"
|
||||
;;
|
||||
|
||||
fsck)
|
||||
shift
|
||||
cmd_fsck "${@}"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue