root/branches/newmole/data/dos2unix_ncx.pl

Revision 13, 1.3 kB (checked in by gary, 3 years ago)

adjust file properties for ascii and perl files - no source change

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1#!perl -w
2
3# This is a perl script to convert ascii pc files into unix eol files
4# it copies files into the ncx dir, files that are not in the distribution
5# but are needed for running locally
6
7$master_dir = "c:/projects/cloudy/current/unix/";
8
9
10# bring in the perl module that includes copy
11use File::Copy;
12
13# this loops over all files in the current directory
14# and copyies unix version to subdir ncx, which should be empty
15# costar models
16while( defined( $input = glob("*.fluxes") ) )
17{
18        print( "$input going to " );
19        $output = "$master_dir"."ncx/"."$input";
20        print("$output\n");
21        # actually execute the code
22        system "dos2unix < $input  > $output";
23}
24
25# rauch, kurucz, werner stars
26while( defined( $input = glob("*.ascii") ) )
27{
28        print( "$input going to " );
29        $output = "$master_dir"."ncx/"."$input";
30        print("$output\n");
31        # actually execute the code
32        system "dos2unix < $input  > $output";
33}
34
35# just picks up kurucz.list
36while( defined( $input = glob("*.list") ) )
37{
38        print( "$input going to " );
39        $output = "$master_dir"."ncx/"."$input";
40        print("$output\n");
41        # actually execute the code
42        system "dos2unix < $input  > $output";
43}
44
45
46
47print("\n=========================\n");
48print("All files have been copies to ncx subdir\n");
49print("=========================\n");
50
51print( "data copy complete\n");
Note: See TracBrowser for help on using the browser.