From eba068f3c963e1cd306a0ad875a16abd02833d1d Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Sat, 23 May 2026 08:13:40 -0600 Subject: [PATCH] sum updoots --- create-attributable-archive.sh | 15 ++++++--- reset.sh | 57 ---------------------------------- 2 files changed, 10 insertions(+), 62 deletions(-) delete mode 100755 reset.sh diff --git a/create-attributable-archive.sh b/create-attributable-archive.sh index feefbb1..c2a3ac5 100755 --- a/create-attributable-archive.sh +++ b/create-attributable-archive.sh @@ -29,11 +29,16 @@ reset() { find . -type f \( -path ".git" -o -path "keystore" -o -path "archives" \) -prune \( -name "*.sha512" -o -name "checksums*" -o -name "private_*" -o -name ".*" -o -name "*.sig" -o -name "*.7z" -o -name "anonymous_signer" \) -print -exec shred -uz {} \; checkcode $? - printf "nuking errant priv key files..." - shred -uz private_* - checkcode $? - shred -uz attribution_passphrase_* - checkcode $? + if [ -f private_* ]; then + printf "nuking errant priv key files..." + shred -uz private_* + checkcode $? + fi + if [ -f attribution_passphrase_* ]; then + printf "nuking errant attribution passphrase files" + shred -uz attribution_passphrase_* + checkcode $? + fi echo "autoshredding out..." srm -r -z -l -l "$out_dir" diff --git a/reset.sh b/reset.sh deleted file mode 100755 index 34a3f16..0000000 --- a/reset.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -checkcode () { - local retcode - if [ -z "$1" ]; then - echo -e "\n\e[31mERROR!\033[0m checkcode missing return code parameter\n" - exit 1 - else - retcode=$1 - fi - - if [ $retcode -ne 0 ]; then - echo -e "\e[31mERROR!\033[0m Response Code: $retcode" - else - printf '\e[1;32mOK!\e[0m\n' - fi -} - -printf "autoshredding these files..." -find . -type f \( -path ".git" -o -path "keystore" -o -path "archives" \) -prune \( -name "*.sha512" -o -name "checksums*" -o -name "private_*" -o -name ".*" -o -name "*.sig" -o -name "*.7z" -o -name "anonymous_signer" \) -print -exec shred -uz {} \; -checkcode $? - -printf "nuking errant priv key files..." -shred -uz private_* -checkcode $? -shred -uz attribution_passphrase_* -checkcode $? - -echo "autoshredding out..." -srm -r -z -l -l ./out -checkcode $? - -echo "rebuilding out..." -printf "making out dir structure..." -mkdir -p out/contents -checkcode $? -printf "updating out/contents/READMD.md..." -echo "put files to verifiably archive in here" > out/contents/README.md -checkcode $? -printf "updating out/README.md..." -echo "# todo: make this nice" > ./out/README.md -checkcode $? - -printf "making out/test_validate_passphrase.sh..." -cp test_validation_passphrase.txt out/test_validate_passphrase.sh -checkcode $? -printf "making out/test_validate_passphrase.sh executable..." -chmod +x out/test_validate_passphrase.sh -checkcode $? -printf "making out/verify-everything.sh..." -cp verify-everything.txt out/verify-everything.sh -checkcode $? -printf "making out/verify-everything.sh executable" -chmod +x out/verify-everything.sh -checkcode $? - -echo -e "\n\n\033[0;32mdone :3\033[0m\n\n" -