github.com/mforkel/docker-ce-i386@v17.12.1-ce-rc2+incompatible/components/packaging/static/hash_files (about)

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