Files
docker-cli/components/packaging/static/hash_files
Eli Uriegas b3cf695357 Add file hashing for static files
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: a1b7f6f3407546ff41ed2e0d16d7e1b2a8ac0ef4
Component: packaging
2017-05-22 14:43:24 -07:00

12 lines
261 B
Bash

#!/usr/bin/env bash
# Simple script to hash all the files in a given directory
DIR_TO_LOOK_IN=${1:-build/linux}
for f in $(find "$DIR_TO_LOOK_IN" -type f); do
for hash_algo in md5 sha256; do
"${hash_algo}sum" "$f" > "$f.$hash_algo"
done
done