Update computechecksums.sh
This commit is contained in:
@@ -1,8 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
FILE="$1"
|
FILE="$1"
|
||||||
|
|
||||||
|
if [ -f "./checksums.txt" ]; then
|
||||||
|
truncate ./checksums.txt
|
||||||
|
else
|
||||||
touch ./checksums.txt
|
touch ./checksums.txt
|
||||||
sha1sum "$FILE" >> ./checksums.txt
|
fi
|
||||||
md5sum "$FILE" >> ./checksums.txt
|
|
||||||
sha256sum "$FILE" >> ./checksums.txt
|
|
||||||
|
|
||||||
|
echo $FILE >> ./checksums.txt
|
||||||
|
echo '' >> ./checksums.txt
|
||||||
|
|
||||||
|
echo 'SHA1' >> ./checksums.txt && sha1sum "$FILE" | awk '{print $1}' >> ./checksums.txt
|
||||||
|
echo '' >> ./checksums.txt
|
||||||
|
echo 'MD5' >> ./checksums.txt && md5sum "$FILE" | awk '{print $1}' >> ./checksums.txt
|
||||||
|
echo '' >> ./checksums.txt
|
||||||
|
echo 'SHA256' >> ./checksums.txt && sha256sum "$FILE" | awk '{print $1}' >> ./checksums.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user