Make hostname prefix configurable

This commit is contained in:
Djuri 2023-11-16 00:08:46 +01:00
parent 43bf05ffb9
commit 03617b4e04
7 changed files with 184 additions and 3 deletions

9
scripts/hash.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
data_directory="data/build"
# Use find to list all files in the directory (including hidden files), sort them, and then calculate the hash
#hash=$(find "$data_directory" -type f \( ! -iname ".*" \) | LC_ALL=C sort | xargs cat | shasum -a 256 | cut -d ' ' -f 1)
hash=$(find "$data_directory" -type f \( ! -iname ".*" \) | LC_ALL=C sort | xargs -I {} cat {} | shasum -a 256 | cut -d ' ' -f 1)
echo "Hash of files in $data_directory: $hash"