Friday, November 16, 2012

Split one multi-patch file into many files, one file per patch (file paths in patch must not use spaces):

perl -ne 'BEGIN{$c=1}if(m!diff -urN.* [^/]+/(.*)!){($x=$1)=~s!/!_!g;close F;open F,">",sprintf("%03d-",$c).$x.".patch";$c++}print F' mult-patch-filename.patch

No comments:

Post a Comment