From fe07aaba94c4d6078445ab1ad3082ec39ad0421d Mon Sep 17 00:00:00 2001 From: tetragon Date: Sun, 23 Sep 2007 20:42:04 +0000 Subject: Prevent the converters from mutilating files that don't start with a shebang git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1656 4979c152-3d1c-0410-bac9-87ea11338e46 --- dists/win32/shebang-activeperl.pl | 6 +++++- dists/win32/shebang-strawberry.pl | 6 +++++- dists/win32/shebang-vanilla.pl | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'dists') diff --git a/dists/win32/shebang-activeperl.pl b/dists/win32/shebang-activeperl.pl index b3c6ac14..b9b27641 100644 --- a/dists/win32/shebang-activeperl.pl +++ b/dists/win32/shebang-activeperl.pl @@ -16,7 +16,11 @@ foreach $file (@perlfiles) { $line = shift @file; - print FH "#!c:\\perl\\bin\\perl\n"; + if ($line =~ /^#!/) { + print FH "#!c:\\perl\\bin\\perl\n"; + } else { + print FH $line; + } print FH @file; close(FH); diff --git a/dists/win32/shebang-strawberry.pl b/dists/win32/shebang-strawberry.pl index 9c30b593..f2c0361f 100644 --- a/dists/win32/shebang-strawberry.pl +++ b/dists/win32/shebang-strawberry.pl @@ -16,7 +16,11 @@ foreach $file (@perlfiles) { $line = shift @file; - print FH "#!c:\\strawberry-perl\\perl\\bin\\perl\n"; + if ($line =~ /^#!/) { + print FH "#!c:\\strawberry-perl\\perl\\bin\\perl\n"; + } else { + print FH $line; + } print FH @file; close(FH); diff --git a/dists/win32/shebang-vanilla.pl b/dists/win32/shebang-vanilla.pl index 6c8a5c95..31cdf6fc 100644 --- a/dists/win32/shebang-vanilla.pl +++ b/dists/win32/shebang-vanilla.pl @@ -16,7 +16,11 @@ foreach $file (@perlfiles) { $line = shift @file; - print FH "#!c:\\vanilla-perl\\perl\\bin\\perl\n"; + if ($line =~ /^#!/) { + print FH "#!c:\\vanilla-perl\\perl\\bin\\perl\n"; + } else { + print FH $line; + } print FH @file; close(FH); -- cgit v1.2.3