index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-05-15 09:58:31 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-05-15 09:58:31 +0200 |
commit | 7b09ca326731653be4d8baa54be133de1e31a550 (patch) | |
tree | 2d8887e5850f1a38a3867163417e776f8d379847 | |
parent | 8f2b7e42637e3cabdd4c970e2a65720df27b303e (diff) |
-rwxr-xr-x | lib/common-functions | 14 |
diff --git a/lib/common-functions b/lib/common-functions index 65189dc..a4cc1ef 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -704,3 +704,17 @@ irc_say() { fi fi } + +# calculate_script_checksum +# calculate and print a checksum of the main script and all scripts in lib/ +calculate_script_checksum() { + { + sha512sum "$0" + find "${base_dir}/lib" -type f \ + -exec sha512sum '{}' \; + } | \ + sort | \ + awk '{print $1}' | \ + sha512sum | \ + awk '{print $1}' +} |