Skip to content

Commit

Permalink
extractor.sh: fix "Image detected"
Browse files Browse the repository at this point in the history
Signed-off-by: ShivamKumarJha <[email protected]>
  • Loading branch information
ShivamKumarJha authored and erfanoabdi committed Jan 21, 2020
1 parent ec48c53 commit 5cc1754
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions extractor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,9 @@ elif [[ $(7z l -ba $romzip | gawk '{print $NF}' | grep "system_new.img\|^system.
find "$tmpdir" -maxdepth 1 -type f -name "*_image.emmc.img" | rename 's/_image.emmc.img/.img/g' > /dev/null 2>&1 # proper .img names
find "$tmpdir" -maxdepth 1 -type f -name "*_new.img" | rename 's/_new.img/.img/g' > /dev/null 2>&1 # proper .img names
find "$tmpdir" -maxdepth 1 -type f -name "*.img.ext4" | rename 's/.img.ext4/.img/g' > /dev/null 2>&1 # proper .img names
for partition in $PARTITIONS; do
[[ -e "$tmpdir/$partition.img" ]] && mv "$tmpdir/$partition.img" "$outdir/$partition.img"
done
romzip=""
elif [[ $(7z l -ba $romzip | grep "system.sin\|system_X-FLASH-ALL-A2CD.sin") ]]; then
echo "sin detected"
cd $tmpdir
7z x -y $romzip 2>/dev/null >> $tmpdir/zip.log
find "$tmpdir" -maxdepth 1 -type f -name "*_X-FLASH-ALL-A2CD.sin" | rename 's/_X-FLASH-ALL-A2CD.sin/.sin/g' > /dev/null 2>&1 # proper names
$unsin -d $tmpdir
Expand All @@ -168,7 +165,6 @@ elif [[ $(7z l -ba $romzip | grep "system.sin\|system_X-FLASH-ALL-A2CD.sin") ]];
done
elif [[ $(7z l -ba $romzip | grep ".*.pac") ]]; then
echo "pac detected"
cd $tmpdir
7z x -y $romzip 2>/dev/null >> $tmpdir/zip.log
find $tmpdir/ -name "* *" -type d,f | rename 's/ /_/g' > /dev/null 2>&1
pac_list=`find $tmpdir/ -type f -name "*.pac" -printf '%P\n' | sort`
Expand Down

0 comments on commit 5cc1754

Please sign in to comment.