sum updoots

This commit is contained in:
2026-05-23 09:10:30 -06:00
parent 555cc9c142
commit 88a8ec4b6f
+18 -2
View File
@@ -8,7 +8,7 @@ signature_tag="file-integrity"
out_dir="./out" out_dir="./out"
inner_dir="$out_dir/contents" inner_dir="$out_dir/contents"
checkcode () { checkcode() {
local retcode local retcode
if [ -z "$1" ]; then if [ -z "$1" ]; then
echo -e "\n\e[31mERROR!\033[0m checkcode missing return code parameter\n" echo -e "\n\e[31mERROR!\033[0m checkcode missing return code parameter\n"
@@ -56,7 +56,7 @@ reset() {
checkcode $? checkcode $?
printf "making "$out_dir"/test_validate_passphrase.sh..." printf "making "$out_dir"/test_validate_passphrase.sh..."
cp test_validation_passphrase.txt "$out_dir/test_validate_passphrase.sh" cp test_validate_passphrase.txt "$out_dir/test_validate_passphrase.sh"
checkcode $? checkcode $?
printf "making $out_dir/test_validate_passphrase.sh executable..." printf "making $out_dir/test_validate_passphrase.sh executable..."
chmod +x "$out_dir/test_validate_passphrase.sh" chmod +x "$out_dir/test_validate_passphrase.sh"
@@ -67,6 +67,22 @@ reset() {
printf "making $out_dir/verify-everything.sh executable"... printf "making $out_dir/verify-everything.sh executable"...
chmod +x "$out_dir/verify-everything.sh" chmod +x "$out_dir/verify-everything.sh"
checkcode $? checkcode $?
housekeeping_dirs=("archives" "keystore")
for dir in "${housekeeping_dirs[@]}"; do
printf "changing ownership of $dir to ${USER}..."
chown $USER:$USER -R "$dir"
checkcode $?
printf "changing permissions on $dir to 700..."
chmod 700 "$dir"
checkcode $?
printf "finding and shredding erroneous dirs in ${dir}..."
find "$dir" -mindepth 1 -type d -exec srm -r -z -l -l "{}" \;
checkcode $?
printf "changing perms of files in $dir to 600..."
find "$dir" -type f -exec chmod 600 "{}" \;
checkcode $?
done
} }
printf "setting up environment..." printf "setting up environment..."