This commit is contained in:
2026-05-18 20:38:32 -06:00
parent 7602cb5949
commit 9fd820b955
4 changed files with 484 additions and 60 deletions
+19 -21
View File
@@ -42,9 +42,10 @@ cleanup () {
}
# cleanup any errant files on error/termination
trap cleanup ERR
trap cleanup SIGINT
trap cleanup SIGTERM
## disable dis shit fo now
# trap cleanup ERR
# trap cleanup SIGINT
# trap cleanup SIGTERM
echo -e "\n\n\nSTARTING DUMP OPS\n\n\n"
@@ -82,8 +83,9 @@ webhook "Changing perms abd ownership on $img_name"
sudo chown princesspi:princesspi "$img_name"
sudo chmod 660 "$img_name"
webhook "generating sha256 checksum of $img_name (from $disk) to $img_name.sha256 (Script Has Run $SECONDS Seconds)"
sha256sum "$img_name" | tee -a "$img_name.sha256"
# fuckin nope rn
# webhook "generating sha256 checksum of $img_name (from $disk) to $img_name.sha256 (Script Has Run $SECONDS Seconds)"
# sha256sum "$img_name" | tee -a "$img_name.sha256"
if [[ "$picheck" =~ [nN] ]]; then
webhook "Doing non-pi xz compression on $img_name into $img_name.xz"
@@ -94,28 +96,24 @@ else
## -r use advanced filesystem repair option if the normal one fails
## -Z xz compression
## -a compress using multiple cores
## -n disable update check
## disavble upgrade check
webhook "Doing pi compress using pishrink from $img_name ($disk) to $img_name.xz (Script Has Run $SECONDS Seconds)"
pishrink -v -r -Z -a "$img_name" | tee -a "$log"
pishrink -v -r -Z -a -n "$img_name" | tee -a "$log"
fi
# pishrink
## -v verbose
## -r use advanced filesystem repair option if the normal one fails
## -Z xz compression
## -a compress using multiple cores
webhook "doing pishrink from $img_name ($disk) to $img_name.xz (Script Has Run $SECONDS Seconds)"
pishrink -v -r -Z -a "$img_name" | tee -a "$log"
webhook "testing xz integrity: $img_name.xz (Script Has Run $SECONDS Seconds)"
xz -t -v "$img_name.xz" | tee -a "$log"
webhook "xz integrity response code: $?"
# fuck yourself
# webhook "testing xz integrity: $img_name.xz (Script Has Run $SECONDS Seconds)"
# xz -t -v "$img_name.xz" | tee -a "$log"
# webhook "xz integrity response code: $?"
webhook "Generating sha256 checksums of $img_name.xz to $img_name.xz.sha256 (Script Has Run $SECONDS Seconds)"
sha256sum "$img_name.xz" | tee -a "$img_name.xz.sha256"
if [ -f "$img_name" ]; then
webhook "$img_name still there! Deleting by force!"
sudo rm -f "$img_name"
fi
# do not fuckin deletee this shit till it works right
# if [ -f "$img_name" ]; then
# webhook "$img_name still there! Deleting by force!"
# sudo rm -f "$img_name"
# fi
webhook "\n\n\nFUCKING FINAALLY ITS OVER\n\n\n\t$SECONDS Seconds Elapsed\n\tDateTime Started: $timestamp DateTime Finished: $(date +%Y-%m-%d-%H%M-%Z)"