Heray-Was-Here
Server : Apache
System : Linux vps43555.mylogin.co 3.10.0-1160.53.1.vz7.185.3 #1 SMP Tue Jan 25 12:49:12 MSK 2022 x86_64
User : redsea ( 60651)
PHP Version : 7.4.32
Disable Function : NONE
Directory :  /usr/local/bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/bin/vlmerge
#!/usr/bin/perl

use strict;
use warnings;

use VCS::Lite;
use Getopt::Long;

my $output;

GetOptions(
	'output=s' => \$output
	);

if (@ARGV != 3) {
	print <<END;

Usage:	$0 [--output outfile] original changed1 changed2

If --output is not specified, the results are put in place
of the original, and the original is renamed to *.orig

END
	exit;
}

my ($orig,$chg1,$chg2) = @ARGV;

my $el1 = VCS::Lite->new($orig);
my $el2 = VCS::Lite->new($chg1);
my $el3 = VCS::Lite->new($chg2);

my $el4 = $el1->merge($el2,$el3) or die "Merge failed";

if (!$output) {
	rename $orig, "$orig.orig";
	$output = $orig;
}

open MERGE,">$output";
print MERGE $el4->text;
close MERGE;


Hry