diff options
| author | Joe Ludwig <[email protected]> | 2013-07-17 18:26:59 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-07-17 18:26:59 -0700 |
| commit | e16ea21dc8a710237ade8413207f58d403c616a3 (patch) | |
| tree | 85dcfbda9881e4e022dedafefbc2727e2fd2aa59 /mp/src/devtools/bin/splitdiff3.pl | |
| parent | Merge pull request #36 from AnAkIn1/fogplayerparams_fix (diff) | |
| download | source-sdk-2013-e16ea21dc8a710237ade8413207f58d403c616a3.tar.xz source-sdk-2013-e16ea21dc8a710237ade8413207f58d403c616a3.zip | |
* Added support for building shaders in your mod
* Added nav mesh support
* fixed many warnings and misc bugs
* Fixed the create*projects scripts in mp
* Added a bunch of stuff to .gitignore
Diffstat (limited to 'mp/src/devtools/bin/splitdiff3.pl')
| -rw-r--r-- | mp/src/devtools/bin/splitdiff3.pl | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/mp/src/devtools/bin/splitdiff3.pl b/mp/src/devtools/bin/splitdiff3.pl new file mode 100644 index 00000000..e38b493a --- /dev/null +++ b/mp/src/devtools/bin/splitdiff3.pl @@ -0,0 +1,54 @@ +$infilename = shift;
+$outfilename1 = shift;
+$outfilename2 = shift;
+open INPUT, $infilename || die;
+@input = <INPUT>;
+close INPUT;
+
+open MERGEDMINE, ">$outfilename1" || die;
+open MERGEDTHEIRS, ">$outfilename2" || die;
+
+for( $i = 0; $i < scalar( @input ); $i++ )
+{
+ $line = $input[$i];
+
+ if( $line =~ m/^(.*)<<<<<<</ )
+ {
+ $first = 1;
+ $second = 0;
+ print MERGEDMINE $1;
+ print MERGEDTHEIRS $1;
+ next;
+ }
+ # Make sure that we are in a split block so that comments with ======= don't mess us up.
+ if( $line =~ m/^(.*)=======$/ && $first == 1 )
+ {
+ $first = 0;
+ $second = 1;
+ print MERGEDMINE $1;
+ next;
+ }
+ if( $line =~ m/^(.*)>>>>>>>/ )
+ {
+ $first = $second = 0;
+ print MERGEDTHEIRS $1;
+ next;
+ }
+
+ if( $first )
+ {
+ print MERGEDMINE $line;
+ }
+ elsif( $second )
+ {
+ print MERGEDTHEIRS $line;
+ }
+ else
+ {
+ print MERGEDMINE $line;
+ print MERGEDTHEIRS $line;
+ }
+}
+
+close MERGEDMINE;
+close MERGEDTHEIRS;
|