# Sha1sum for a directory of directories

bashhashing

sha1sum ./path/to/directory/* | sha1sum


the above was posted as a way to compute a sha1sum of a directory which contains files. This command fails if the directory includes more directories. Is there a way to recursively compute the sha1sum of a directory of directories universally (without custom fitting an algorithm to the particular directory in question)?

find . -type f $$-exec sha1sum "PWD"/{} \;$$ | sha1sum