From: curt Date: Fri, 2 Oct 1998 21:41:55 +0000 (+0000) Subject: Added Makedir + fixes for win32. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=621b7a117bf2a4620ffb62c27f567b5de5702012;p=flightgear.git Added Makedir + fixes for win32. --- diff --git a/Tools/Makefile.am b/Tools/Makefile.am index 7fd79620f..41cc40b7c 100644 --- a/Tools/Makefile.am +++ b/Tools/Makefile.am @@ -9,6 +9,7 @@ SUBDIRS = \ FixNode \ FixObj \ GenAirports \ + Makedir \ SplitTris \ Stripe_w \ Tri2obj \ diff --git a/Tools/process-dem.pl b/Tools/process-dem.pl index d81f53b4a..5751ec498 100755 --- a/Tools/process-dem.pl +++ b/Tools/process-dem.pl @@ -99,7 +99,8 @@ sub fix_command { chop($system); if ( $system =~ m/CYGWIN32/ ) { - $in =~ s/\//\\\\/; + $in =~ s/\/+/\//g; + $in =~ s/\//\\/g; } return($in); @@ -440,8 +441,26 @@ sub install { $tmp =~ s/$work_dir//; # print "Temp dir = $tmp\n"; $install_dir = "$fg_root/$tmp"; + + # try to get rid of double // + $install_dir =~ s/\/+/\//g; print "Install dir = $install_dir\n"; - system("mkdir -p $install_dir"); + + if ( $system !~ m/CYGWIN32/ ) { + $command = "mkdir -p $install_dir"; + } else { + $command = "Makedir/makedir $install_dir"; + $command = fix_command($command); + } + + # system($command); + + open(OUT, "$command |"); + while ( ) { + print $_; + } + close(OUT); + # write out version and info record open(VERSION, ">$install_dir/VERSION") || @@ -461,7 +480,10 @@ sub install { if ( $file =~ m/\d\d.obj$/ ) { $new_file = file_root($file); - $command = "gzip -v --best < $subdir/$file > $install_dir/$new_file.gz"; + $command = + "gzip -v --best < $subdir/$file > $install_dir/$new_file.gz"; + $command = fix_command($command); + # $command = fix_command($command); print "Running '$command'\n"; open(OUT, "$command |"); @@ -489,6 +511,9 @@ sub install { #--------------------------------------------------------------------------- # $Log$ +# Revision 1.29 1998/10/02 21:41:56 curt +# Added Makedir + fixes for win32. +# # Revision 1.28 1998/09/17 18:40:15 curt # Changes to allow multiple copies of the scenery processing tools # to be run concurrently.