diff options
Diffstat (limited to 'systemd-zfs-partition-backup/AUR/getsha256sum.sh')
-rwxr-xr-x | systemd-zfs-partition-backup/AUR/getsha256sum.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/systemd-zfs-partition-backup/AUR/getsha256sum.sh b/systemd-zfs-partition-backup/AUR/getsha256sum.sh new file mode 100755 index 0000000..92760b3 --- /dev/null +++ b/systemd-zfs-partition-backup/AUR/getsha256sum.sh | |||
@@ -0,0 +1,21 @@ | |||
1 | #!/usr/bin/bash | ||
2 | # source PKGBUILD | ||
3 | # function allsha() { | ||
4 | # for i in $source | ||
5 | # do | ||
6 | # printf "'%s' " "$(wget -q -O- "$i" | sha256sum | awk '/-$/{ print $1 }')" | ||
7 | # done | ||
8 | # } | ||
9 | # | ||
10 | # allsha | tee /tmp/output.txt | ||
11 | |||
12 | |||
13 | ARCHIVE=$(mktemp --suffix=.tar.bz2) | ||
14 | |||
15 | cd $(git rev-parse --show-toplevel) | ||
16 | git archive -o "$ARCHIVE" master | ||
17 | cd - > /dev/null | ||
18 | |||
19 | cat $ARCHIVE | sha256sum | awk '/-$/{ print $1 }' | ||
20 | rm $ARCHIVE | ||
21 | |||