summaryrefslogtreecommitdiff
path: root/src/xi.sh
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-03-20 10:46:08 +0000
committerdavidovski <david@davidovski.xyz>2022-03-20 10:46:08 +0000
commit4103bae6d29b50d2dabb7af7be7676b705944da2 (patch)
tree863cc298e969bb8259ee3a403f7a9b2ef5d2dec1 /src/xi.sh
parenteac3c122678d19e090742d01e348d800d358733a (diff)
added file validation
Diffstat (limited to 'src/xi.sh')
-rwxr-xr-xsrc/xi.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/xi.sh b/src/xi.sh
index 6cbb315..9bb6bbf 100755
--- a/src/xi.sh
+++ b/src/xi.sh
@@ -47,8 +47,10 @@ Available Commands:
search the database for a package
files [package]
list files belonging to a package
+ verify [package]
+ verify that a package's files are intact
list
- list available packagesa
+ list available packages
list-installed
lists installed packages
file [path]
@@ -176,6 +178,14 @@ else
shift
file_info $@
;;
+ "verify")
+ shift
+ [ -z "$*" ] && set -- $(ls ${INSTALLED_DIR})
+ while [ ! -z "$*" ]; do
+ validate_files $1 || printf "${LIGHT_RED}Failed to verify $1\n"
+ shift
+ done
+ ;;
"bootstrap")
shift
. ${LIBDIR}/bootstrap.sh