| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | use File::Copy; |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | $basename = "c:/projects/cloudy/trunk/"; |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | $trunk_dir = "$basename"."tsuite"; |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | $unix_copy_dir = "$basename"."unix/tsuite"; |
|---|
| 22 | |
|---|
| 23 | $unix_copy_basedir = "$basename"."unix"; |
|---|
| 24 | |
|---|
| 25 | $win_copy_dir = "$basename"."win/tsuite"; |
|---|
| 26 | |
|---|
| 27 | $win_copy_basedir = "$basename"."win"; |
|---|
| 28 | |
|---|
| 29 | $cluster_copy_dir = "u:/cloudy/trunk/tsuite"; |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | $ftp_last = "u:/pub/gary/bleeding_edge/last"; |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | @subdirs=("auto","slow"); |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | for ($ndir=0; $ndir<2; $ndir++) |
|---|
| 42 | { |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | $dir = "$cluster_copy_dir"."/"."$subdirs[$ndir]"; |
|---|
| 50 | chdir( "$dir" ) or die " could not move to cluster target directory \n"; |
|---|
| 51 | print(" moved to cluster tsuite directory, about to delete in files\n"); |
|---|
| 52 | |
|---|
| 53 | unlink <*.in>; |
|---|
| 54 | |
|---|
| 55 | |
|---|
| 56 | $dir = "$unix_copy_dir"."/"."$subdirs[$ndir]"; |
|---|
| 57 | chdir( "$dir" ) or die " could not move to test suite directory \n"; |
|---|
| 58 | print(" moved to tsuite unix target directory, about to delete all files\n"); |
|---|
| 59 | |
|---|
| 60 | unlink <*> ; |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | $dir = "$win_copy_dir"."/"."$subdirs[$ndir]"; |
|---|
| 64 | chdir( "$dir" ) or die " could not move to test suite directory \n"; |
|---|
| 65 | print(" moved to tsuite win target directory, about to delete all files\n"); |
|---|
| 66 | |
|---|
| 67 | unlink <*> ; |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | |
|---|
| 73 | |
|---|
| 74 | |
|---|
| 75 | |
|---|
| 76 | |
|---|
| 77 | |
|---|
| 78 | $dir = "$trunk_dir"."/"."$subdirs[$ndir]"; |
|---|
| 79 | chdir( "$dir" ) or die " could not move to trunk directory \n"; |
|---|
| 80 | |
|---|
| 81 | |
|---|
| 82 | |
|---|
| 83 | |
|---|
| 84 | while( defined( $input = glob("*.in") ) ) |
|---|
| 85 | { |
|---|
| 86 | print( "$input going to " ); |
|---|
| 87 | $output = "$unix_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 88 | print("$output\n"); |
|---|
| 89 | |
|---|
| 90 | system "dos2unix < $input > $output"; |
|---|
| 91 | |
|---|
| 92 | |
|---|
| 93 | print( "$input going to " ); |
|---|
| 94 | $output = "$win_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 95 | print("$output\n"); |
|---|
| 96 | |
|---|
| 97 | copy( $input , $output ); |
|---|
| 98 | } |
|---|
| 99 | |
|---|
| 100 | |
|---|
| 101 | while( defined( $input = glob("*.htm") ) ) |
|---|
| 102 | { |
|---|
| 103 | print( "$input going to " ); |
|---|
| 104 | $output = "$unix_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 105 | print("$output\n"); |
|---|
| 106 | |
|---|
| 107 | system "dos2unix < $input > $output"; |
|---|
| 108 | $output = "$win_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 109 | print("$output\n"); |
|---|
| 110 | |
|---|
| 111 | copy( $input , $output ); |
|---|
| 112 | } |
|---|
| 113 | |
|---|
| 114 | |
|---|
| 115 | while( defined( $input = glob("*.ini") ) ) |
|---|
| 116 | { |
|---|
| 117 | print( "$input going to " ); |
|---|
| 118 | $output = "$unix_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 119 | print("$output\n"); |
|---|
| 120 | |
|---|
| 121 | system "dos2unix < $input > $output"; |
|---|
| 122 | $output = "$win_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 123 | print("$output\n"); |
|---|
| 124 | |
|---|
| 125 | copy( $input , $output ); |
|---|
| 126 | } |
|---|
| 127 | |
|---|
| 128 | |
|---|
| 129 | while( defined( $input = glob("*.dat") ) ) |
|---|
| 130 | { |
|---|
| 131 | print( "$input going to " ); |
|---|
| 132 | $output = "$unix_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 133 | print("$output\n"); |
|---|
| 134 | |
|---|
| 135 | system "dos2unix < $input > $output"; |
|---|
| 136 | $output = "$win_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 137 | print("$output\n"); |
|---|
| 138 | |
|---|
| 139 | copy( $input , $output ); |
|---|
| 140 | } |
|---|
| 141 | |
|---|
| 142 | |
|---|
| 143 | copy( "clouds.jpg" , "$unix_copy_dir"."/"."$subdirs[$ndir]"."/"."clouds.jpg" ); |
|---|
| 144 | |
|---|
| 145 | copy( "clouds.jpg" , "$win_copy_dir"."/"."$subdirs[$ndir]"."/"."clouds.jpg" ); |
|---|
| 146 | |
|---|
| 147 | |
|---|
| 148 | while( defined( $input = glob("*.pl") ) ) |
|---|
| 149 | { |
|---|
| 150 | print( "$input going to " ); |
|---|
| 151 | $output = "$unix_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 152 | print("$output\n"); |
|---|
| 153 | |
|---|
| 154 | system "dos2unix < $input > $output"; |
|---|
| 155 | $output = "$win_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 156 | print("$output\n"); |
|---|
| 157 | |
|---|
| 158 | copy( $input , $output ); |
|---|
| 159 | } |
|---|
| 160 | |
|---|
| 161 | print("All tsuite files have been copied to pc unix and win subdirs\n"); |
|---|
| 162 | |
|---|
| 163 | |
|---|
| 164 | $dir = "$unix_copy_dir"."/"."$subdirs[$ndir]"; |
|---|
| 165 | chdir( "$dir" ) or die " could not move to pc unix directory \n"; |
|---|
| 166 | |
|---|
| 167 | |
|---|
| 168 | while( defined( $input = glob("*") ) ) |
|---|
| 169 | { |
|---|
| 170 | print( "$input going to " ); |
|---|
| 171 | $output = "$cluster_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 172 | print("$output\n"); |
|---|
| 173 | |
|---|
| 174 | copy( $input , $output ); |
|---|
| 175 | } |
|---|
| 176 | |
|---|
| 177 | |
|---|
| 178 | |
|---|
| 179 | |
|---|
| 180 | |
|---|
| 181 | |
|---|
| 182 | |
|---|
| 183 | |
|---|
| 184 | $tarfile_basename = "tsuite_"."$subdirs[$ndir]"; |
|---|
| 185 | |
|---|
| 186 | $dir = "$unix_copy_dir"."/"."$subdirs[$ndir]"; |
|---|
| 187 | chdir( "$dir" ) or die " could not move to pc unix directory \n"; |
|---|
| 188 | print(" moved to unix copy directory\n"); |
|---|
| 189 | |
|---|
| 190 | $tarfile = "$unix_copy_basedir"."/"."$tarfile_basename".".tar"; |
|---|
| 191 | |
|---|
| 192 | if( -e "$tarfile" ) |
|---|
| 193 | { |
|---|
| 194 | unlink("$tarfile" ); |
|---|
| 195 | } |
|---|
| 196 | |
|---|
| 197 | |
|---|
| 198 | |
|---|
| 199 | |
|---|
| 200 | |
|---|
| 201 | system "C:\\u\\mks\\mksnt\\tar_mks.exe -cf $tarfile * "; |
|---|
| 202 | print( "about to gzip $tarfile\n" ); |
|---|
| 203 | |
|---|
| 204 | if( -e "$tarfile".".gz" ) |
|---|
| 205 | { |
|---|
| 206 | unlink("$tarfile".".gz" ); |
|---|
| 207 | } |
|---|
| 208 | system "gzip $tarfile "; |
|---|
| 209 | |
|---|
| 210 | |
|---|
| 211 | copy( "$tarfile".".gz" , $ftp_last ); |
|---|
| 212 | |
|---|
| 213 | |
|---|
| 214 | $dir = "$win_copy_dir"."/"."$subdirs[$ndir]"; |
|---|
| 215 | chdir( "$dir" ) or die " could not move to pc win directory \n"; |
|---|
| 216 | print(" moved to win copy directory\n"); |
|---|
| 217 | |
|---|
| 218 | |
|---|
| 219 | $tarfile = "$win_copy_basedir"."/"."$tarfile_basename".".zip"; |
|---|
| 220 | if( -e "$tarfile" ) |
|---|
| 221 | { |
|---|
| 222 | unlink("$tarfile" ); |
|---|
| 223 | } |
|---|
| 224 | |
|---|
| 225 | |
|---|
| 226 | |
|---|
| 227 | system "wzzip $tarfile "; |
|---|
| 228 | |
|---|
| 229 | |
|---|
| 230 | copy( "$tarfile" , $ftp_last ); |
|---|
| 231 | |
|---|
| 232 | print("\ndone\n"); |
|---|
| 233 | |
|---|
| 234 | } |
|---|