bundlewrap/bundles/archive/files/validate_file
mwiegand 0a9f3493b9 wip
2021-06-20 01:49:25 +02:00

15 lines
217 B
Bash

#!/bin/bash
FILENAME=$1
ARCHIVE=$(/opt/archive/get_file "$FILENAME" | sha256sum)
ORIGINAL=$(cat "$FILENAME" | sha256sum)
if [[ "$ARCHIVE" == "$ORIGINAL" ]]
then
echo "OK"
exit 0
else
echo "ERROR"
exit 1
fi