Add initial files

This commit is contained in:
2025-11-22 22:50:50 -08:00
commit bad45b4a1a
3 changed files with 33 additions and 0 deletions

17
create-file-message.sh Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
TEMPLATE_FILE="$(dirname $0)/verify-script.template"
read -p "Enter message to sign for the file: " MESSAGE
MESSAGE="$MESSAGE\n"
#echo "message: $MESSAGE"
FILE_NAME="$(basename $1)"
#echo "file name: $FILE_NAME"
FILE_HASH="$(sha256sum $FILE_NAME | awk '{print $1}')"
#echo "file hash: $FILE_HASH"
SUBSTITUTED_TEMPLATE=$(sed -e "s!{message}!$MESSAGE!g" -e "s!{filename}!$FILE_NAME!g" -e "s!{filehash}!$FILE_HASH!g" $TEMPLATE_FILE)
#echo "substituted: $SUBSTITUTED_TEMPLATE"
printf "$SUBSTITUTED_TEMPLATE" > "$1.sh"