File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -438,15 +438,21 @@ elif [[ $(7z l -ba "${romzip}" | grep "system.sin\|.*system_.*\.sin") ]]; then
438438 echo " super image inside a sin detected"
439439 superimage
440440 fi
441- elif [[ $( 7z l -ba " ${romzip} " | grep " .pac$" ) ]]; then
442- echo " pac detected"
443- 7z x -y " ${mzip} " 2> /dev/null >> " $tmpdir " /zip.log
444- find " $tmpdir " / -name " * *" -type d,f | rename ' s/ /_/g' > /dev/null 2>&1
445- pac_list=$( find " $tmpdir " / -type f -name " *.pac" -printf ' %P\n' | sort)
446- for file in $pac_list ; do
447- python3 " $pacextractor " " $file " " $PWD "
441+ elif 7z l -ba " ${romzip} " | grep -q " .pac$" ; then
442+ echo " [INFO] Unisoc package detected"
443+
444+ # Extract '.pac' to our directory, and sanitize image(s)
445+ 7z x -y " ${romzip} " 2> /dev/null >> " $tmpdir " /zip.log
446+ find " ${tmpdir} " -name " * *" -type d,f | rename ' s/ /_/g' > /dev/null 2>&1
447+
448+ # Extract (all) found '.pac' package(s)
449+ pac=$( find " $tmpdir " / -type f -name " *.pac" -printf ' %P\n' | sort)
450+ for f in ${pac} ; do
451+ python3 " ${pacextractor} " " ${f} " " ${PWD} "
448452 done
449- if [[ -f super.img ]]; then
453+
454+ if [ -f super.img ]; then
455+ echo " [INFO] Extracting 'super.img'..."
450456 superimage
451457 fi
452458elif [[ $( 7z l -ba " ${romzip} " | grep " system.bin" ) ]]; then
You can’t perform that action at this time.
0 commit comments