art-museum/generate-manifest.sh

15 lines
299 B
Bash
Raw Permalink Normal View History

2022-09-23 03:32:29 -07:00
#!/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