File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -394,21 +394,21 @@ elif 7z l -ba "${romzip}" 2>/dev/null | grep -q rawprogram; then
394394 }
395395
396396 for p in ${PARTITIONS} ; do
397+ # There might be 'rawprogram_unsparse0.xml', which is preferred
398+ if [ -f " ${PWD} /rawprogram_unsparse0.xml" ]; then
399+ RAWPROGRAM=" ${PWD} /rawprogram_unsparse0.xml"
400+ else
401+ RAWPROGRAM=" $( grep -rlw " ${p} " rawprogram* .xml) "
402+ fi
403+
397404 # Rename RAW images into normal images
398405 if [[ -f " $p .raw.img" ]]; then
399406 mv " $p .raw.img" " $p .img"
400407 else
401- # There might be 'rawprogram_unsparse0.xml', which is preferred
402- if [ -f " ${PWD} /rawprogram_unsparse0.xml" ]; then
403- RAWPROGRAM=" ${PWD} /rawprogram_unsparse0.xml"
404- else
405- RAWPROGRAM=" $( grep -rlw " ${p} " rawprogram* .xml) "
406- fi
407-
408408 # Extract (existing) images via 'packsparseimg'
409409 if ls " ${PWD} " | grep -q " ${p} " ; then
410- echo " [INFO] Extracting '${p} .img' with 'packsparseimg'..."
411- " ${packsparseimg} " -t " ${p} " -x " ${RAWPROGRAM} " 2> /dev/null || echo " [WARNING] ' ${p} .img' extraction failed. "
410+ echo " [INFO] Trying to extract '${p} .img' with 'packsparseimg'..."
411+ " ${packsparseimg} " -t " ${p} " -x " ${RAWPROGRAM} " >> /dev/null 2>&1
412412 mv " ${p} .raw" " ${p} .img" 2> /dev/null
413413 fi
414414 fi
You can’t perform that action at this time.
0 commit comments