Skip to content

Commit

Permalink
extractor.sh: ruu: keep required partitions only
Browse files Browse the repository at this point in the history
  • Loading branch information
erfanoabdi committed Jan 21, 2020
1 parent f825c4f commit e13caee
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions extractor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,13 @@ fi

if [[ $(echo $romzip | grep -i ruu_ | grep -i exe) ]]; then
echo "RUU detected"
cd $outdir
$ruu -s $romzip 2>/dev/null
$ruu -f $romzip 2>/dev/null
cd ../../input
find OUT -name *.img -exec cp {} $outdir \;
find OUT_* -name *.img -exec cp {} $outdir \;
rm -rf OUT*
cd $outdir
find "$(dirname $romzip)/OUT"* -name *.img -exec mv {} $tmpdir \;
for partition in $PARTITIONS; do
[[ -e "$tmpdir/$partition.img" ]] && mv "$tmpdir/$partition.img" "$outdir/$partition.img"
done
rm -rf $tmpdir "$(dirname $romzip)/OUT"*
exit 0
fi

Expand Down

0 comments on commit e13caee

Please sign in to comment.