Skip to content

Commit

Permalink
refactor: Match Telegram messages with Python dumper's
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoninoScordino committed Oct 1, 2024
1 parent a4b24a7 commit 6d45b13
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions extract_and_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ else
# Extract the images
for p in "${PARTITIONS[@]}"; do
if [[ -f $p.img ]]; then
sendTG_edit_wrapper temporary "${MESSAGE_ID}" "${MESSAGE}"$'\n'"<code>Partition Name: ${p}</code>" > /dev/null
# Create a folder for each partition
mkdir "$p" || rm -rf "${p:?}"/*

# Try to extract images via 'fsck.erofs'
Expand All @@ -272,9 +272,6 @@ else
7zz -snld x "$p".img -y -o"$p"/ > /dev/null || {
echo "[ERROR] Extraction via '7zz' failed."

# Clear the last partition status
sendTG_edit_wrapper permanent "${MESSAGE_ID}" "${MESSAGE}" > /dev/null

# In case of failure, bail out and abort dumping altogether
sendTG_edit_wrapper permanent "${MESSAGE_ID}" "${MESSAGE}"$'\n'"<code>Extraction failed!</code>" > /dev/null
terminate 1
Expand Down

0 comments on commit 6d45b13

Please sign in to comment.