diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2022-12-15 07:16:20 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2022-12-15 07:16:20 +0200 |
commit | b0bd9068957bd96beaa3eb4f15acd6a9804bba70 (patch) | |
tree | eee606c392f6e64927c85ed60e55cc2dbb38c774 /bin/filesplitter | |
parent | ab13523b261dc973410b06d6ebf6ad6f395329bb (diff) | |
download | arching-kaos-tools-b0bd9068957bd96beaa3eb4f15acd6a9804bba70.tar.gz arching-kaos-tools-b0bd9068957bd96beaa3eb4f15acd6a9804bba70.tar.bz2 arching-kaos-tools-b0bd9068957bd96beaa3eb4f15acd6a9804bba70.zip |
Commented out -xe flags from script and generated script, outputs map's hash.
Diffstat (limited to 'bin/filesplitter')
-rwxr-xr-x | bin/filesplitter | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/filesplitter b/bin/filesplitter index 0236642..2fb0ed9 100755 --- a/bin/filesplitter +++ b/bin/filesplitter @@ -17,7 +17,8 @@ # 6. We are done! # -set -xe +# Uncomment next line if you want to debug +# set -xe PROGRAM="$(basename $0)" if [ ! -f "$1" ] @@ -83,7 +84,8 @@ else logit "[INFO]" "Workdir found" fi -echo 'set -xe' > $TEMPORARYDIR/cmd_queue.sh +# Uncomment next line in case you want to debug the resulting script as well +# echo 'set -xe' > $TEMPORARYDIR/cmd_queue.sh CHECKSUM=$(sha512sum "$FILE"|awk '{print $1}') split -b 1048576 --additional-suffix ".chk" -d "$FILE" "$TECHDIR$(basename "$FILE")-" @@ -100,8 +102,10 @@ rm $TEMPORARYDIR/cmd_queue.sh echo "$CHECKSUM $(basename "$FILE")" >> $TEMPORARYDIR/map -cat $TEMPORARYDIR/map +MAPFILEHASH="$(sha512sum $TEMPORARYDIR/map | awk '{ print $1 }')" `sha512sum $TEMPORARYDIR/map | awk '{print "mv " $2 " '$FILEMAPSDIR'" $1}'` rm -rf $TEMPORARYDIR + +echo "Hash of the map is $MAPFILEHASH and it's located at $FILEMAPSDIR" |