Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsaifurrahmann committed Jul 15, 2023
1 parent b7ed195 commit 1300fab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flash-stock-rom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,20 @@ case $flasher in

if grep -q "$replace" "$file1"; then
awk -v search="$replace" -v replace="$look" '{ gsub(search, replace); print }' "$file1" > flash_all.txt && mv flash_all.txt "$file1"

awk -v search="/stock-rom/images/" -v replace="/images/" '{ gsub(search, replace); print }' "$file1" > flash_all.txt && mv flash_all.txt "$file1"
fi

if grep -q "$replace" "$file2"; then
awk -v search="$replace" -v replace="$look" '{ gsub(search, replace); print }' "$file2" > flash_all.txt && mv flash_all.txt "$file2"

awk -v search="/stock-rom/images/" -v replace="/images/" '{ gsub(search, replace); print }' "$file2" > flash_all.txt && mv flash_all.txt "$file2"
fi

if grep -q "$replace" "$file3"; then
awk -v search="$replace" -v replace="$look" '{ gsub(search, replace); print }' "$file3" > flash_all.txt && mv flash_all.txt "$file3"

awk -v search="/stock-rom/images/" -v replace="/images/" '{ gsub(search, replace); print }' "$file3" > flash_all.txt && mv flash_all.txt "$file3"
fi

echo -e "\033[0;32m Modified Flash file restored! \033[0m"
Expand Down

0 comments on commit 1300fab

Please sign in to comment.