2002-04-10 05:54:20 -05:00
|
|
|
:
|
|
|
|
eval 'exec perl -wS $0 ${1+"$@"}'
|
|
|
|
if 0;
|
|
|
|
#*************************************************************************
|
|
|
|
#
|
2008-04-10 10:48:58 -05:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2002-04-10 05:54:20 -05:00
|
|
|
#
|
2008-04-10 10:48:58 -05:00
|
|
|
# Copyright 2008 by Sun Microsystems, Inc.
|
2002-04-10 05:54:20 -05:00
|
|
|
#
|
2008-04-10 10:48:58 -05:00
|
|
|
# OpenOffice.org - a multi-platform office productivity suite
|
2002-04-10 05:54:20 -05:00
|
|
|
#
|
2008-04-10 10:48:58 -05:00
|
|
|
# $RCSfile: guw.pl,v $
|
2002-04-10 05:54:20 -05:00
|
|
|
#
|
2008-04-10 10:48:58 -05:00
|
|
|
# $Revision: 1.28 $
|
2002-04-10 05:54:20 -05:00
|
|
|
#
|
2008-04-10 10:48:58 -05:00
|
|
|
# This file is part of OpenOffice.org.
|
2002-04-10 05:54:20 -05:00
|
|
|
#
|
2008-04-10 10:48:58 -05:00
|
|
|
# OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
# only, as published by the Free Software Foundation.
|
2002-04-10 05:54:20 -05:00
|
|
|
#
|
2008-04-10 10:48:58 -05:00
|
|
|
# OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser General Public License version 3 for more details
|
|
|
|
# (a copy is included in the LICENSE file that accompanied this code).
|
2002-04-10 05:54:20 -05:00
|
|
|
#
|
2008-04-10 10:48:58 -05:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# version 3 along with OpenOffice.org. If not, see
|
|
|
|
# <http://www.openoffice.org/license.html>
|
|
|
|
# for a copy of the LGPLv3 License.
|
2002-04-10 05:54:20 -05:00
|
|
|
#
|
|
|
|
#*************************************************************************
|
|
|
|
# Description: ??
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
2002-10-25 07:16:18 -05:00
|
|
|
# external modules
|
|
|
|
use Text::ParseWords;
|
|
|
|
|
2002-04-10 05:54:20 -05:00
|
|
|
# global vars
|
|
|
|
@params = ();
|
|
|
|
|
|
|
|
# set debug mode here:
|
|
|
|
#$debug="true";
|
2003-03-27 04:48:49 -06:00
|
|
|
#$debug_light="true";
|
2002-04-10 05:54:20 -05:00
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
# Define known parameter exceptions
|
2005-06-23 09:33:26 -05:00
|
|
|
%knownpara = ( 'echo', [ '/TEST', 'QQQ', 'CCC', 'uno:' ],
|
2004-09-08 08:51:22 -05:00
|
|
|
'cl', [ '-clr:', '-Z' ],
|
2004-11-09 11:31:19 -06:00
|
|
|
'csc', [ '-target:' ],
|
2002-04-10 05:54:20 -05:00
|
|
|
'lib', [ 'OUT:', 'EXTRACT:','out:', 'def:', 'machine:' ],
|
|
|
|
'link', [ 'BASE:', 'DEBUG', 'DLL', 'LIBPATH', 'MACHINE:',
|
|
|
|
'MAP', 'NODEFAULTLIB', 'OPT', 'PDB', 'RELEASE',
|
2002-05-06 04:59:51 -05:00
|
|
|
'SUBSYSTEM', 'STACK', 'out:', 'map:', 'ENTRY:',
|
2005-02-11 11:24:47 -06:00
|
|
|
'implib:', 'delayload:', 'def', 'COMMENT:' ],
|
2003-07-02 07:42:49 -05:00
|
|
|
'regcomp', [ '-env:', 'vnd.sun.star.expand:' , 'vnd.openoffice.pymodule' ],
|
2004-12-14 02:47:12 -06:00
|
|
|
'regmerge', [ '/UCR' ],
|
2005-10-13 10:48:17 -05:00
|
|
|
'rc', [ '-D' ],
|
2004-12-14 02:47:12 -06:00
|
|
|
'rsc', [ '-DOOO_' ] );
|
2002-04-10 05:54:20 -05:00
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
# procedures
|
|
|
|
|
2004-11-09 11:31:19 -06:00
|
|
|
|
|
|
|
#----------------------------------------------------------
|
|
|
|
# Function name: myCygpath
|
|
|
|
# Description: Transform POSIX path to DOS path
|
|
|
|
# Arguments: 1. Variable (string) with one token
|
|
|
|
# 2. optional - if set remove spaces and shorten to 8.3
|
|
|
|
# representation.
|
|
|
|
# Return value: Reformatted String
|
|
|
|
#----------------------------------------------------------
|
|
|
|
sub myCygpath {
|
|
|
|
my $posixpath = shift;
|
|
|
|
my $shortenpath = shift || '';
|
|
|
|
|
|
|
|
my $dospath;
|
|
|
|
|
|
|
|
if ( $posixpath =~ / / and $shortenpath ) {
|
|
|
|
chomp( $dospath = qx{cygpath -d "$posixpath"} );
|
|
|
|
# "cygpath -d" returns "" if the file doesn't exist.
|
|
|
|
if ($dospath eq "") {
|
|
|
|
$dospath = ".";
|
|
|
|
print(STDERR "Error: guw.pl: Path: $posixpath:\nhas a problem! Probably nonexistent filename with space.\n");
|
|
|
|
if ( (defined $debug_light) or (defined $debug) ) {
|
|
|
|
die "exiting ...\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if ( $posixpath =~ /^\// ) {
|
|
|
|
chomp( $dospath = qx{cygpath -w "$posixpath"} );
|
|
|
|
} else {
|
|
|
|
$dospath = $posixpath;
|
|
|
|
$dospath =~ s/\//\\/g;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $dospath;
|
|
|
|
}
|
|
|
|
|
2002-04-10 05:54:20 -05:00
|
|
|
#----------------------------------------------------------
|
|
|
|
# Function name: WinFormat
|
|
|
|
# Description: Format variables to Windows Format.
|
2002-10-25 07:16:18 -05:00
|
|
|
# Arguments: 1. Variable (string) with one token
|
2002-04-10 05:54:20 -05:00
|
|
|
# Return value: Reformatted String
|
|
|
|
#----------------------------------------------------------
|
|
|
|
sub WinFormat {
|
|
|
|
my $variable = shift @_;
|
2002-10-25 07:16:18 -05:00
|
|
|
my( $d1, $d1_prefix, $d2 );
|
|
|
|
|
2002-04-10 05:54:20 -05:00
|
|
|
$variable =~ s/(\$\w+)/$1/eeg ; # expand the variables
|
|
|
|
$variable =~ s/(\$\w+)/$1/eeg ; # expand the variables twice!
|
2004-03-09 05:19:01 -06:00
|
|
|
|
|
|
|
# Include paths or parameters with filenames
|
2007-03-26 08:14:42 -05:00
|
|
|
if ( $variable =~ /\A(-D[\w\.]*=)[\'\"]?((?:\/?[\w\.\-\+ ~]+)+\/?)[\'\"]?\Z/ ) {
|
|
|
|
# This regex evaluates -D<something>=<path>, sometimes with quotes or "/" at the end
|
|
|
|
# option -> $1, filename without quotes -> $2
|
|
|
|
if ( defined $debug ) { print(STDERR "WinFormat:\ninclude (-D<something>=<path>) path:\n$variable\n"); }
|
|
|
|
$d1_prefix = $1;
|
|
|
|
$d1 = $2;
|
|
|
|
$d2 = myCygpath($2,1);
|
|
|
|
if ( $d2 ne "" ) {
|
|
|
|
$d2 =~ s/\\/\\\\/g ;
|
|
|
|
}
|
|
|
|
} elsif ( $variable =~ /\A(-?\w[\w\.]*=)[\'\"]?((?:\/?[\w\.\-\+ ~]+)+\/?)[\'\"]?\Z/ ) {
|
2004-03-09 05:19:01 -06:00
|
|
|
# This regex evaluates [-]X<something>=<path>, sometimes with quotes or "/" at the end
|
|
|
|
# option -> $1, filename without quotes -> $2
|
|
|
|
if ( defined $debug ) { print(STDERR "WinFormat:\ninclude ([-]<something>=<path>) path:\n$variable\n"); }
|
|
|
|
$d1_prefix = $1;
|
2007-03-26 08:14:42 -05:00
|
|
|
$d1 = $2;
|
|
|
|
$d2 = myCygpath($2,1);
|
|
|
|
} elsif ( $variable =~ /\A(--\w[\w\.\-]*=)[\'\"]?((?:\/?[\w\.\-\+ ~]+)+\/?)[\'\"]?\Z/ ) {
|
|
|
|
# This regex evaluates --<something>=<path>, sometimes with quotes or "/" at the end
|
|
|
|
# option -> $1, filename without quotes -> $2
|
|
|
|
if ( defined $debug ) { print(STDERR "WinFormat:\ninclude (--<something>=<path>) path:\n$variable\n"); }
|
|
|
|
$d1_prefix = $1;
|
|
|
|
$d1 = $2;
|
|
|
|
$d2 = myCygpath($2,1);
|
|
|
|
} elsif ( $variable =~ /\A(-\w[\w\.]*:)[\'\"]?((?:\/?[\w\.\-\+ ~]+)+\/?)[\'\"]?\Z/ ) {
|
2004-11-09 11:31:19 -06:00
|
|
|
# This regex evaluates -X<something>:<path>, sometimes with quotes or "/" at the end
|
|
|
|
# option -> $1, filename without quotes -> $2
|
|
|
|
if ( defined $debug ) { print(STDERR "WinFormat:\nFound (-<something>:<path>):\n$variable\n"); }
|
|
|
|
$d1_prefix = $1;
|
2007-03-26 08:14:42 -05:00
|
|
|
$d1 = $2;
|
|
|
|
$d2 = myCygpath($2,1);
|
2004-11-09 11:31:19 -06:00
|
|
|
} elsif ( $variable =~ /\A(-\w+:)(.*)\Z/ ) {
|
|
|
|
# This regex evaluates -X<something>:<NO-path>, and prevents translating of these.
|
|
|
|
# option -> $1, rest -> $2
|
|
|
|
if ( defined $debug ) { print(STDERR "WinFormat:\nFound (-<something>:<no-path>):\n$variable\n"); }
|
|
|
|
$d1_prefix = $1;
|
2007-03-26 08:14:42 -05:00
|
|
|
$d1 = $2;
|
|
|
|
$d2 = myCygpath($2,1);
|
|
|
|
} elsif ( $variable =~ /\A(\w+:)[\'\"]?\/\/\/((?:\/?[\w\.\-\+ ~]+)+\/?)[\'\"]?\Z/ ) {
|
2004-11-09 11:31:19 -06:00
|
|
|
# See iz35982 for the reason for the special treatment of this switch.
|
|
|
|
# This regex evaluates <something>:///<path>, sometimes with quotes or "/" at the end
|
|
|
|
# option -> $1, filename without quotes -> $2
|
|
|
|
if ( defined $debug ) { print(STDERR "WinFormat:\nFound (<something>:///<path>):\n$variable\n"); }
|
|
|
|
$d1_prefix = $1."///";
|
2007-03-26 08:14:42 -05:00
|
|
|
$d1 = $2;
|
|
|
|
$d2 = myCygpath($2,1);
|
|
|
|
$d2 =~ s/\\/\//g ;
|
|
|
|
} elsif ( $variable =~ /\A(-\w)[\'\"]?((?:\/[\w\.\-\+ ~]+)+\/?)[\'\"]?\Z/ ) {
|
2004-11-09 11:31:19 -06:00
|
|
|
# This regex evaluates -X<path>, sometimes with quotes or "/" at the end
|
|
|
|
# option -> $1, filename without quotes -> $2
|
2005-06-20 08:50:46 -05:00
|
|
|
if ( defined $debug ) { print(STDERR "WinFormat:\ninclude (-X<absolute path>) path:\n$variable\n"); }
|
|
|
|
$d1_prefix = $1;
|
2007-03-26 08:14:42 -05:00
|
|
|
$d1 = $2;
|
|
|
|
$d2 = myCygpath($2,1);
|
|
|
|
} elsif ( $variable =~ /\A(-F[ARdemopr])[\'\"]?((?:\/[\w\.\-\+ ~]+)+\/?)[\'\"]?\Z/ ) {
|
2005-06-20 08:50:46 -05:00
|
|
|
# This regex evaluates -FX<path> (MSVC switches for output naming), sometimes with quotes or "/" at the end
|
|
|
|
# option -> $1, filename without quotes -> $2
|
|
|
|
if ( defined $debug ) { print(STDERR "WinFormat:\ncompiler naming (-FX<absolute path>) path:\n$variable\n"); }
|
2004-11-09 11:31:19 -06:00
|
|
|
$d1_prefix = $1;
|
2007-03-26 08:14:42 -05:00
|
|
|
$d1 = $2;
|
|
|
|
$d2 = myCygpath($2,1);
|
2004-03-09 05:19:01 -06:00
|
|
|
} else {
|
2007-03-26 08:14:42 -05:00
|
|
|
$d2 = "";
|
2004-03-09 05:19:01 -06:00
|
|
|
}
|
2007-03-26 08:14:42 -05:00
|
|
|
if ( $d2 ne "" ) {
|
2004-11-09 11:31:19 -06:00
|
|
|
# Found a parameter
|
2007-03-26 08:14:42 -05:00
|
|
|
$d1 =~ s/\+/\\\+/ ;
|
|
|
|
$d1 =~ s/\./\\\./ ;
|
|
|
|
$variable =~ s/$d1/$d2/ ;
|
2004-11-09 11:31:19 -06:00
|
|
|
} else {
|
|
|
|
# Found no parameter, assume a path
|
|
|
|
$variable =~ s/:/;/g;
|
|
|
|
$variable =~ s/([;]|\A)(\w);/$1$2:/g; # get back the drives
|
|
|
|
|
|
|
|
# Search for posix path ;entry; (The regex accepts valid paths with at least one /)
|
|
|
|
# and replace with DOS path, accept quotes.
|
|
|
|
# iz28717 Accept ',' as path seperator.
|
2007-03-26 08:14:42 -05:00
|
|
|
while ( $variable =~ /(?:[;,]|\A)[\'\"]?([\w\.\-\+ ~]*(?:\/[\w\.\-\+ ~]+)+\/?)[\'\"]?(?:[;,]|\Z)/ ) {
|
2004-11-09 11:31:19 -06:00
|
|
|
# Normal paths
|
|
|
|
$d1 = $1;
|
|
|
|
$d2 = myCygpath($d1);
|
|
|
|
if ( defined $debug ) {
|
|
|
|
print(STDERR "WinFormat:\nFull path:\n$variable\nTranslated part:$d2\n");
|
|
|
|
}
|
2007-03-26 08:14:42 -05:00
|
|
|
$d1 =~ s/\+/\\\+/ ;
|
2004-11-09 11:31:19 -06:00
|
|
|
$variable =~ s/$d1/$d2/ ;
|
2002-10-25 07:16:18 -05:00
|
|
|
}
|
2002-04-10 05:54:20 -05:00
|
|
|
}
|
2004-03-09 05:19:01 -06:00
|
|
|
|
|
|
|
# Sanity check for -X<path>
|
2007-03-26 08:14:42 -05:00
|
|
|
if ( $variable =~ /-\w[\'\"]?(?:(?:\/[\w\.\-\+ ~]+)+)/ ) {
|
2002-10-25 07:16:18 -05:00
|
|
|
print(STDERR "Error: guw.pl: WinFormat: Not converted -X/... type switch in :$variable:.\n");
|
|
|
|
if ( (defined $debug_light) or (defined $debug) ) { die "\nNot processed -X/...\n"; }
|
|
|
|
}
|
2004-11-09 11:31:19 -06:00
|
|
|
# Sanity check for [-]X<something>(:|=)<path> case
|
2007-03-26 08:14:42 -05:00
|
|
|
if ( $variable =~ /\A-?\w[\w\.]*[=:][\'\"]?(?:\/[\w\.\-\+ ~]+)+/ ) {
|
2004-11-09 11:31:19 -06:00
|
|
|
print(STDERR "Error: guw.pl: WinFormat: Not converted [-]X<something>(=|:)/<path> type switch in :$variable:.\n");
|
|
|
|
if ( (defined $debug_light) or (defined $debug) ) { die "\nNot processed [-]X<something>(=|:)/...\n"; }
|
2004-03-09 05:19:01 -06:00
|
|
|
}
|
|
|
|
|
2002-10-25 07:16:18 -05:00
|
|
|
if ( defined $debug ) { print(STDERR "WinFormat:\nresult:$variable\n");};
|
2002-04-10 05:54:20 -05:00
|
|
|
return $variable;
|
|
|
|
}
|
|
|
|
|
|
|
|
#----------------------------------------------------------
|
|
|
|
# Function name: replace_cyg
|
|
|
|
# Description: Process all arguments and change them to Windows Format.
|
|
|
|
# Arguments: Reference to array with arguments
|
|
|
|
# Return value: -
|
|
|
|
#----------------------------------------------------------
|
|
|
|
sub replace_cyg {
|
|
|
|
my $args = shift;
|
2002-10-25 07:16:18 -05:00
|
|
|
my( @cmd_file, @cmd_temp );
|
2004-06-16 04:34:34 -05:00
|
|
|
my $atchars;
|
2002-04-10 05:54:20 -05:00
|
|
|
foreach my $para ( @$args )
|
|
|
|
{
|
|
|
|
if ( $para =~ "^@" ) {
|
|
|
|
# it's a command file
|
|
|
|
if ( defined $debug ) { print(STDERR "----------------------------\n");};
|
2004-06-16 04:34:34 -05:00
|
|
|
# Workaround, iz28717, keep number of @'s.
|
|
|
|
$para =~ s/(^\@+)//;
|
|
|
|
$atchars = $1;
|
2002-04-10 05:54:20 -05:00
|
|
|
$filename = $para;
|
|
|
|
if ( defined $debug ) { print(STDERR "filename = $filename \n");};
|
|
|
|
# open this command file for reading
|
|
|
|
open(CMD, "$filename");
|
|
|
|
while ( <CMD> ) {
|
|
|
|
# Remove DOS lineendings. Bug in Cygwin / Perl?
|
|
|
|
$_ =~ s/\r//g;
|
2002-10-25 07:16:18 -05:00
|
|
|
# Remove lineendings and trailing spaces. ( Needed by &parse_line )
|
|
|
|
$_ =~ s/\n$//g;
|
|
|
|
$_ =~ s/\s+$//g;
|
2002-04-10 05:54:20 -05:00
|
|
|
# Fill all tokens into array
|
2002-10-25 07:16:18 -05:00
|
|
|
@cmd_temp = &parse_line('\s+', 1, $_ );
|
|
|
|
if ( $#cmd_temp > -1 ) {
|
|
|
|
push( @cmd_file, @cmd_temp);
|
|
|
|
}
|
2002-04-10 05:54:20 -05:00
|
|
|
}
|
|
|
|
close(CMD);
|
|
|
|
# reformat all tokens
|
|
|
|
replace_cyg(\@cmd_file);
|
|
|
|
if ( defined $debug ) { print(STDERR "Tokens processed:\n");};
|
|
|
|
foreach $i (@cmd_file) {
|
|
|
|
if ( defined $debug ) { print(STDERR "!".$i."!\n");};
|
|
|
|
}
|
|
|
|
# open this filename for writing (truncate) Textmode?
|
|
|
|
open(CMD, '>', $filename);
|
|
|
|
# write all tokens back into this file
|
|
|
|
print(CMD join(' ', @cmd_file));
|
|
|
|
close(CMD);
|
2002-10-25 07:16:18 -05:00
|
|
|
# convert '@filename' to dos style
|
2002-04-10 05:54:20 -05:00
|
|
|
$para = WinFormat( $para );
|
|
|
|
if ( defined $debug ) { print(STDERR "----------------------------\n");};
|
2002-10-25 07:16:18 -05:00
|
|
|
if ( (defined $debug_light) or (defined $debug) ) { print(STDERR "\nParameter in File:".join(' ', @cmd_file).":\n");}
|
2004-06-16 04:34:34 -05:00
|
|
|
$para = $atchars.$para;
|
2002-04-10 05:54:20 -05:00
|
|
|
} else {
|
|
|
|
# it's just a parameter
|
|
|
|
if ( defined $debug ) { print(STDERR "\nParameter:---${para}---\n");};
|
|
|
|
# If $tmp1 is empty then $para is a parameter.
|
|
|
|
my $is_no_para = 1;
|
2003-03-27 04:48:49 -06:00
|
|
|
# remove .exe and convert to lower case
|
|
|
|
$shortcommand = lc $command ;
|
|
|
|
$shortcommand =~ s/\.exe$//;
|
2007-03-26 08:14:42 -05:00
|
|
|
$shortcommand =~ /([^\/]+$)/;
|
2003-03-27 04:48:49 -06:00
|
|
|
$shortcommand = $1;
|
|
|
|
foreach $i (@{$knownpara{$shortcommand}}) {
|
2002-04-10 05:54:20 -05:00
|
|
|
if( $para =~ /$i/ ) {
|
|
|
|
$is_no_para = 0;
|
2003-03-27 04:48:49 -06:00
|
|
|
if ( defined $debug ) { print(STDERR "Is parameter exception for ${shortcommand}: ${para}:\n" );};
|
2002-04-10 05:54:20 -05:00
|
|
|
last;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if( $is_no_para ) {
|
|
|
|
$para = WinFormat($para);
|
|
|
|
}
|
|
|
|
if ( defined $debug ) { print(STDERR "Converted line:${para}:\n" );};
|
|
|
|
} # else
|
|
|
|
} # foreach loop
|
2002-08-22 07:32:30 -05:00
|
|
|
}
|
2002-04-10 05:54:20 -05:00
|
|
|
|
2002-08-22 07:32:30 -05:00
|
|
|
#----------------------------------------------------------
|
|
|
|
# Function name: replace_cyg_env
|
|
|
|
# Description: Process selected environment variables and change
|
|
|
|
# them to Windows Format.
|
|
|
|
# Arguments: -
|
|
|
|
# Return value: -
|
|
|
|
#----------------------------------------------------------
|
|
|
|
sub replace_cyg_env {
|
|
|
|
@affected_vars = (
|
|
|
|
'SOLAR_VERSION',
|
|
|
|
'SOLARVERSION',
|
|
|
|
'SOLARVER',
|
|
|
|
'SRC_ROOT',
|
|
|
|
'LOCALINI',
|
|
|
|
'GLOBALINI',
|
|
|
|
'SOLARENV',
|
|
|
|
'STAR_INSTPATH',
|
|
|
|
'STAR_SOLARPATH',
|
|
|
|
'STAR_PACKMISC',
|
|
|
|
'STAR_SOLARENVPATH',
|
|
|
|
'STAR_INITROOT',
|
2004-11-09 11:31:19 -06:00
|
|
|
'STAR_STANDLST',
|
|
|
|
'CLASSPATH',
|
|
|
|
'JAVA_HOME'
|
2002-08-22 07:32:30 -05:00
|
|
|
);
|
|
|
|
foreach my $one_var ( @affected_vars )
|
|
|
|
{
|
|
|
|
my $this_var = $ENV{ $one_var };
|
|
|
|
if ( defined $this_var )
|
|
|
|
{
|
|
|
|
if ( defined $debug ) { print(STDERR "ENV $one_var before: ".$ENV{ $one_var}."\n" );};
|
|
|
|
$ENV{ $one_var } = WinFormat( $this_var );
|
|
|
|
if ( defined $debug ) { print(STDERR "ENV $one_var after : ".$ENV{ $one_var}."\n" );};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2002-04-10 05:54:20 -05:00
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
# main
|
|
|
|
@params = @ARGV;
|
|
|
|
|
|
|
|
$command = shift(@params);
|
2002-08-22 07:32:30 -05:00
|
|
|
while ( $command =~ /^-/ )
|
|
|
|
{
|
|
|
|
if ( $command eq "-env" )
|
|
|
|
{
|
|
|
|
replace_cyg_env;
|
|
|
|
}
|
|
|
|
|
|
|
|
$command = shift(@params);
|
|
|
|
}
|
2004-06-16 04:34:34 -05:00
|
|
|
if ( (defined $debug_light) or (defined $debug) ) { print( STDERR "Command: $command\n" ); }
|
2002-04-10 05:54:20 -05:00
|
|
|
|
|
|
|
replace_cyg(\@params);
|
2002-10-25 07:16:18 -05:00
|
|
|
if ( (defined $debug_light) or (defined $debug) ) { print(STDERR "\n---------------------\nExecute: $command @params\n----------------\n");};
|
2002-10-31 06:17:56 -06:00
|
|
|
exec( "$command", @params) or die( "\nError: guw.pl: executing $command failed!\n" );
|
|
|
|
|