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 @@ -393,22 +393,22 @@ elif 7z l -ba "${romzip}" 2>/dev/null | grep -q rawprogram; then
393393 exit 1
394394 }
395395
396+ # There might be 'rawprogram_unsparse0.xml', which is preferred
397+ if [ -f " ${PWD} /rawprogram_unsparse0.xml" ]; then
398+ RAWPROGRAM=" ${PWD} /rawprogram_unsparse0.xml"
399+ else
400+ RAWPROGRAM=" $( grep -rlw " ${p} " rawprogram* .xml) "
401+ fi
402+
396403 for p in ${PARTITIONS} ; do
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