Skip to content

Commit

Permalink
Update zst.sh
Browse files Browse the repository at this point in the history
Add BLAKE2 check
  • Loading branch information
FalsePhilosopher authored Oct 3, 2024
1 parent f7454f1 commit 4961e6f
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions zst.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
#!/bin/bash
cd /tmp
gh release download -p 'Infosec-Cheatsheets.tar.zst*' -p 'dictionary' -R FalsePhilosopher/Infosec-Cheatsheets
# Workflow to create archive/release
# git pull --recursive --jobs 8 https://github.com/FalsePhilosopher/Infosec-Cheatsheets
# cd Infosec-Cheatsheets
# rm -rf .git
# b2rsum -o
# cd ..
# tar --use-compress-program "zstd -T0 -19" -cvf Infosec-Cheatsheets.tar.zst Infosec-Cheatsheets
# gpg --sign Infosec-Cheatsheets.tar.zst
# split -b 1999M Infosec-Cheatsheets.tar.zst Infosec-Cheatsheets.tar.zst && split -b 1999M Infosec-Cheatsheets.tar.zst.gpg Infosec-Cheatsheets.tar.zst.gpg


cd /tmp/
# gh release download -p 'Infosec-Cheatsheets.tar.zst*' -p 'Infosec-Cheatsheets.tar.zst.sig' -R FalsePhilosopher/Infosec-Cheatsheets
gh release download -p 'Infosec-Cheatsheets.tar.zst*' -R FalsePhilosopher/Infosec-Cheatsheets
cat /tmp/Infosec-Cheatsheets.tar.zst* > /tmp/Infosec-Cheatsheets.tar.zst
rm Infosec-Cheatsheets.tar.zsta*
tar --use-compress-program "zstd -d --rm -T0 -D dictionary" -xvf "Infosec-Cheatsheets.tar.zst" --directory $HOME/Downloads
rm dictionary Infosec-Cheatsheets.tar.zst
# gpg --verify Infosec-Cheatsheets.tar.zst.sig
tar --use-compress-program "zstd -d -T0" -xvf "Infosec-Cheatsheets.tar.zst" --directory $HOME/Downloads
rm Infosec-Cheatsheets.tar.zst
cd $HOME/Downloads/Infosec-Cheatsheets/
b2sum -oRESULTS -c $HOME/Downloads/Infosec-Cheatsheets/BLAKE2SUMS && echo "ALL OK" || echo "WOW! Something fishy's going on"

0 comments on commit 4961e6f

Please sign in to comment.