-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdo.trees.bash
More file actions
executable file
·28 lines (28 loc) · 830 Bytes
/
do.trees.bash
File metadata and controls
executable file
·28 lines (28 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
# Copyright 2019-2022 (c) all rights reserved by S D Rausty
# To check md5sum file use; md5sum -c ztree.sha512.sum
# To create checksum files and commit use; ./do.trees.bash
# https://sdrausty.github.io courtesy https://pages.github.com
#####################################################################
set -eu
rm -f *.sum
FILELIST=( $(find . -type f | grep -v .git | sort) )
CHECKLIST=(md5sum sha1sum sha224sum sha256sum sha384sum sha512sum)
for SCHECK in ${CHECKLIST[@]}
do
printf "%s\\n" "Creating $SCHECK file; Please wait a moment..."
for FILE in "${FILELIST[@]}"
do
$SCHECK "$FILE" >> ztree.${SCHECK::-3}.sum
done
done
for SCHECK in ${CHECKLIST[@]}
do
printf "\\n%s\\n" "Checking $SCHECK..."
$SCHECK -c ztree.${SCHECK::-3}.sum
done
git add .
git commit
git push
ls -al
# do.trees.bash EOF