art-museum/generate-manifest.sh

15 lines
299 B
Bash
Executable File

#!/bin/bash
print_entry_for_file() {
h="`openssl dgst -sha256 -binary "$1" | base64`"
if [[ ! "$h" == "" ]]; then
printf "%b %b\n" "$1" "$h"
fi
}
print_entry_for_file "config.json"
find albums -type f -print0 | while read -d $'\0' file
do
print_entry_for_file "$file"
done