Skip to content

Commit

Permalink
ruu: copy romzip in case of readonly paths
Browse files Browse the repository at this point in the history
  • Loading branch information
erfanoabdi committed Jan 21, 2020
1 parent e13caee commit 9742bd6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions extractor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@ fi

if [[ $(echo $romzip | grep -i ruu_ | grep -i exe) ]]; then
echo "RUU detected"
cp $romzip $tmpdir
romzip="$tmpdir/$(basename $romzip)"
$ruu -s $romzip 2>/dev/null
$ruu -f $romzip 2>/dev/null
find "$(dirname $romzip)/OUT"* -name *.img -exec mv {} $tmpdir \;
find "$tmpdir/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"*
rm -rf $tmpdir
exit 0
fi

Expand Down

0 comments on commit 9742bd6

Please sign in to comment.