summaryrefslogtreecommitdiff
path: root/src/validate.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/validate.sh')
-rw-r--r--src/validate.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/validate.sh b/src/validate.sh
index 42530bb..0c9dd2d 100644
--- a/src/validate.sh
+++ b/src/validate.sh
@@ -56,3 +56,20 @@ keyimport () {
esac
set +o noglob
}
+
+validate_files () {
+ local package=$1
+ local ret=0
+
+ # TODO ensure that all checksums are the same
+ for file in $(files $package); do
+ if [ -f "${SYSROOT}$file" ]; then
+ ${VERBOSE} && printf "${GREEN}%s is present\n" $file
+ else
+ ret=$((ret+1))
+ ${QUIET} || printf "${RED}%s is missing\n" $file
+ fi
+ done
+ ${QUIET} || printf "${RESET}"
+ return $ret
+}