diff options
author | Max Christian Pohle | 2020-07-11 21:10:32 +0200 |
---|---|---|
committer | Max Christian Pohle | 2020-07-11 21:10:32 +0200 |
commit | f3df719ec0949a605d95cfa174f8ad581d25408f (patch) | |
tree | 46c70a7eeeaaeea5e5bf338cb6cf6499cda16dd2 /systemd-zfs-partition-backup/AUR/getsha256sum.sh | |
parent | 111ea82d7872a140c0d097ec1624c8954d6da5c5 (diff) | |
download | zfs-bash-tools-f3df719ec0949a605d95cfa174f8ad581d25408f.tar.bz2 zfs-bash-tools-f3df719ec0949a605d95cfa174f8ad581d25408f.zip |
Fixed sha256sum and the script to produce it
Diffstat (limited to 'systemd-zfs-partition-backup/AUR/getsha256sum.sh')
-rwxr-xr-x | systemd-zfs-partition-backup/AUR/getsha256sum.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/systemd-zfs-partition-backup/AUR/getsha256sum.sh b/systemd-zfs-partition-backup/AUR/getsha256sum.sh index 92760b3..df3d588 100755 --- a/systemd-zfs-partition-backup/AUR/getsha256sum.sh +++ b/systemd-zfs-partition-backup/AUR/getsha256sum.sh | |||
@@ -11,11 +11,18 @@ | |||
11 | 11 | ||
12 | 12 | ||
13 | ARCHIVE=$(mktemp --suffix=.tar.bz2) | 13 | ARCHIVE=$(mktemp --suffix=.tar.bz2) |
14 | echo $ARCHIVE | ||
14 | 15 | ||
15 | cd $(git rev-parse --show-toplevel) | 16 | cd $(git rev-parse --show-toplevel) |
16 | git archive -o "$ARCHIVE" master | 17 | git archive --format=tar.gz --prefix=zfs-bash-tools-master/ -o "$ARCHIVE" master |
17 | cd - > /dev/null | 18 | cd - > /dev/null |
18 | 19 | ||
19 | cat $ARCHIVE | sha256sum | awk '/-$/{ print $1 }' | 20 | echo "# Archive content" |
21 | tar tvf $ARCHIVE | xargs -i printf "\t%s\n" "{}" | ||
22 | echo | ||
23 | echo | ||
24 | echo "# sha256sum" | ||
25 | cat $ARCHIVE | sha256sum | awk '/-$/{ print "\t" $1 "\n" }' | ||
26 | |||
20 | rm $ARCHIVE | 27 | rm $ARCHIVE |
21 | 28 | ||