| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | use File::Copy; |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | $original_source_dir = "c:/projects/cloudy/trunk/source"; |
|---|
| 16 | $original_data_dir = "c:/projects/cloudy/trunk/data"; |
|---|
| 17 | $original_tsuite_dir = "c:/projects/cloudy/trunk/tsuite/auto"; |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | $original_exe = "c:/projects/cloudy/trunk/debug/trunk.exe"; |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | $cluster_unix_source_dir = "u:/cloudy/trunk/source"; |
|---|
| 26 | $cluster_unix_tsuite_dir = "u:/cloudy/trunk/tsuite"; |
|---|
| 27 | $cluster_unix_data_dir = "u:/cloudy/trunk/data"; |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | $ftp_last = "u:/pub/gary/bleeding_edge/last/"; |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | $local_unix_source_dir = "c:/projects/cloudy/trunk/unix/source"; |
|---|
| 34 | $local_unix_tsuite_dir = "c:/projects/cloudy/trunk/unix/tsuite"; |
|---|
| 35 | $local_unix_data_dir = "c:/projects/cloudy/trunk/unix/data"; |
|---|
| 36 | $local_unix_main_dir = "c:/projects/cloudy/trunk/unix"; |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | $local_unix_sourcetar = "$local_unix_main_dir"."/source.tar.gz"; |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | $local_win_source_dir = "c:/projects/cloudy/trunk/win/source"; |
|---|
| 44 | $local_win_tsuite_dir = "c:/projects/cloudy/trunk/win/tsuite"; |
|---|
| 45 | $local_win_data_dir = "c:/projects/cloudy/trunk/win/data"; |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | $unixhome = "c:/projects/cloudy/trunk/unix"; |
|---|
| 49 | $winhome = "c:/projects/cloudy/trunk/win"; |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | $lgCheckTime=1; |
|---|
| 53 | |
|---|
| 54 | |
|---|
| 55 | |
|---|
| 56 | |
|---|
| 57 | if( $lgCheckTime && (-M $local_unix_sourcetar) < (-M $original_exe ) ) |
|---|
| 58 | { |
|---|
| 59 | |
|---|
| 60 | exit; |
|---|
| 61 | } |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | |
|---|
| 65 | |
|---|
| 66 | |
|---|
| 67 | |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | |
|---|
| 73 | |
|---|
| 74 | |
|---|
| 75 | |
|---|
| 76 | if( !chdir( "$local_unix_source_dir" ) ) |
|---|
| 77 | { |
|---|
| 78 | printf(" invalid pc unix target directory for source\n"); |
|---|
| 79 | exit(1); |
|---|
| 80 | } |
|---|
| 81 | print(" moved to pc unix target source directory, about to delete all files\n"); |
|---|
| 82 | |
|---|
| 83 | unlink <*> ; |
|---|
| 84 | |
|---|
| 85 | |
|---|
| 86 | if( !chdir( "$local_win_source_dir" ) ) |
|---|
| 87 | { |
|---|
| 88 | printf(" invalid win target directory for source\n"); |
|---|
| 89 | exit(1); |
|---|
| 90 | } |
|---|
| 91 | print(" moved to win target source directory, about to delete all files\n"); |
|---|
| 92 | |
|---|
| 93 | unlink <*> ; |
|---|
| 94 | |
|---|
| 95 | |
|---|
| 96 | if( !chdir( "$cluster_unix_source_dir" ) ) |
|---|
| 97 | { |
|---|
| 98 | printf(" invalid cluster target directory for source\n"); |
|---|
| 99 | exit(1); |
|---|
| 100 | } |
|---|
| 101 | print(" moved to unix target source directory, about to delete all files\n"); |
|---|
| 102 | |
|---|
| 103 | unlink <*.cpp> ; |
|---|
| 104 | |
|---|
| 105 | |
|---|
| 106 | |
|---|
| 107 | |
|---|
| 108 | if( !chdir( "$local_unix_tsuite_dir" ) ) |
|---|
| 109 | { |
|---|
| 110 | printf(" invalid directory for pc unix target tsuite\n"); |
|---|
| 111 | exit(1); |
|---|
| 112 | } |
|---|
| 113 | print(" moved to tsuite unix target directory, about to delete all files\n"); |
|---|
| 114 | |
|---|
| 115 | unlink <*> ; |
|---|
| 116 | |
|---|
| 117 | |
|---|
| 118 | if( !chdir( "$local_win_tsuite_dir" ) ) |
|---|
| 119 | { |
|---|
| 120 | printf(" invalid directory for win target tsuite\n"); |
|---|
| 121 | exit(1); |
|---|
| 122 | } |
|---|
| 123 | print(" moved to tsuite win target directory, about to delete all files\n"); |
|---|
| 124 | |
|---|
| 125 | unlink <*> ; |
|---|
| 126 | |
|---|
| 127 | |
|---|
| 128 | if( !chdir( "$cluster_unix_tsuite_dir" ) ) |
|---|
| 129 | { |
|---|
| 130 | printf(" invalid directory for cluster target tsuite\n"); |
|---|
| 131 | exit(1); |
|---|
| 132 | } |
|---|
| 133 | print(" moved to tsuite unix target directory, about to delete all files\n"); |
|---|
| 134 | |
|---|
| 135 | unlink <*.in>; |
|---|
| 136 | |
|---|
| 137 | |
|---|
| 138 | |
|---|
| 139 | |
|---|
| 140 | |
|---|
| 141 | |
|---|
| 142 | |
|---|
| 143 | if( !chdir( "$local_unix_data_dir" ) ) |
|---|
| 144 | { |
|---|
| 145 | printf(" invalid unix data directory for data\n"); |
|---|
| 146 | exit(1); |
|---|
| 147 | } |
|---|
| 148 | print(" moved to unix target data directory, about to delete all files\n"); |
|---|
| 149 | |
|---|
| 150 | unlink <*> ; |
|---|
| 151 | |
|---|
| 152 | |
|---|
| 153 | if( !chdir( "$local_win_data_dir" ) ) |
|---|
| 154 | { |
|---|
| 155 | printf(" invalid win data directory for data\n"); |
|---|
| 156 | exit(1); |
|---|
| 157 | } |
|---|
| 158 | print(" moved to win target data directory, about to delete all files\n"); |
|---|
| 159 | |
|---|
| 160 | unlink <*> ; |
|---|
| 161 | |
|---|
| 162 | |
|---|
| 163 | |
|---|
| 164 | |
|---|
| 165 | |
|---|
| 166 | |
|---|
| 167 | |
|---|
| 168 | |
|---|
| 169 | |
|---|
| 170 | |
|---|
| 171 | |
|---|
| 172 | |
|---|
| 173 | |
|---|
| 174 | |
|---|
| 175 | |
|---|
| 176 | |
|---|
| 177 | |
|---|
| 178 | |
|---|
| 179 | |
|---|
| 180 | |
|---|
| 181 | |
|---|
| 182 | if( !chdir( "$original_source_dir" ) ) |
|---|
| 183 | { |
|---|
| 184 | printf(" invalid original target directory for source\n"); |
|---|
| 185 | exit(1); |
|---|
| 186 | } |
|---|
| 187 | |
|---|
| 188 | |
|---|
| 189 | |
|---|
| 190 | while( defined( $input = glob("*") ) ) |
|---|
| 191 | { |
|---|
| 192 | print( "$input going to " ); |
|---|
| 193 | $output = "$local_unix_source_dir"."/"."$input"; |
|---|
| 194 | print("$output\n"); |
|---|
| 195 | |
|---|
| 196 | system "dos2unix < $input > $output"; |
|---|
| 197 | |
|---|
| 198 | |
|---|
| 199 | print( "$input going to " ); |
|---|
| 200 | $output = "$local_win_source_dir"."/"."$input"; |
|---|
| 201 | print("$output\n"); |
|---|
| 202 | |
|---|
| 203 | copy( $input , $output ); |
|---|
| 204 | } |
|---|
| 205 | |
|---|
| 206 | |
|---|
| 207 | copy( "clouds.jpg" , "$local_unix_source_dir"."/"."clouds.jpg" ); |
|---|
| 208 | |
|---|
| 209 | print("\n=========================\n"); |
|---|
| 210 | print("All source files have been copies to unix/source subdir\n"); |
|---|
| 211 | print("=========================\n"); |
|---|
| 212 | |
|---|
| 213 | |
|---|
| 214 | |
|---|
| 215 | |
|---|
| 216 | |
|---|
| 217 | if( !chdir( "$original_tsuite_dir" ) ) |
|---|
| 218 | { |
|---|
| 219 | printf(" invalid directory for original tsuite directory\n"); |
|---|
| 220 | exit(1); |
|---|
| 221 | } |
|---|
| 222 | |
|---|
| 223 | |
|---|
| 224 | |
|---|
| 225 | |
|---|
| 226 | while( defined( $input = glob("*.in") ) ) |
|---|
| 227 | { |
|---|
| 228 | print( "$input going to " ); |
|---|
| 229 | $output = "$local_unix_tsuite_dir"."/"."$input"; |
|---|
| 230 | print("$output\n"); |
|---|
| 231 | |
|---|
| 232 | system "dos2unix < $input > $output"; |
|---|
| 233 | |
|---|
| 234 | |
|---|
| 235 | print( "$input going to " ); |
|---|
| 236 | $output = "$local_win_tsuite_dir"."/"."$input"; |
|---|
| 237 | print("$output\n"); |
|---|
| 238 | |
|---|
| 239 | copy( $input , $output ); |
|---|
| 240 | } |
|---|
| 241 | |
|---|
| 242 | |
|---|
| 243 | |
|---|
| 244 | while( defined( $input = glob("*.htm") ) ) |
|---|
| 245 | { |
|---|
| 246 | print( "$input going to " ); |
|---|
| 247 | $output = "$local_unix_tsuite_dir"."/"."$input"; |
|---|
| 248 | print("$output\n"); |
|---|
| 249 | |
|---|
| 250 | system "dos2unix < $input > $output"; |
|---|
| 251 | $output = "$local_win_tsuite_dir"."/"."$input"; |
|---|
| 252 | print("$output\n"); |
|---|
| 253 | |
|---|
| 254 | copy( $input , $output ); |
|---|
| 255 | } |
|---|
| 256 | |
|---|
| 257 | |
|---|
| 258 | |
|---|
| 259 | |
|---|
| 260 | |
|---|
| 261 | |
|---|
| 262 | |
|---|
| 263 | |
|---|
| 264 | |
|---|
| 265 | |
|---|
| 266 | |
|---|
| 267 | |
|---|
| 268 | |
|---|
| 269 | |
|---|
| 270 | |
|---|
| 271 | |
|---|
| 272 | while( defined( $input = glob("*.dat") ) ) |
|---|
| 273 | { |
|---|
| 274 | print( "$input going to " ); |
|---|
| 275 | $output = "$local_unix_tsuite_dir"."/"."$input"; |
|---|
| 276 | print("$output\n"); |
|---|
| 277 | |
|---|
| 278 | system "dos2unix < $input > $output"; |
|---|
| 279 | $output = "$local_win_tsuite_dir"."/"."$input"; |
|---|
| 280 | print("$output\n"); |
|---|
| 281 | |
|---|
| 282 | copy( $input , $output ); |
|---|
| 283 | } |
|---|
| 284 | |
|---|
| 285 | |
|---|
| 286 | |
|---|
| 287 | |
|---|
| 288 | |
|---|
| 289 | |
|---|
| 290 | |
|---|
| 291 | copy( "clouds.jpg" , "$local_unix_tsuite_dir"."/"."clouds.jpg" ); |
|---|
| 292 | |
|---|
| 293 | copy( "clouds.jpg" , "$local_win_tsuite_dir"."/"."clouds.jpg" ); |
|---|
| 294 | |
|---|
| 295 | |
|---|
| 296 | while( defined( $input = glob("*.pl") ) ) |
|---|
| 297 | { |
|---|
| 298 | print( "$input going to " ); |
|---|
| 299 | $output = "$local_unix_tsuite_dir"."/"."$input"; |
|---|
| 300 | print("$output\n"); |
|---|
| 301 | |
|---|
| 302 | system "dos2unix < $input > $output"; |
|---|
| 303 | $output = "$local_win_tsuite_dir"."/"."$input"; |
|---|
| 304 | print("$output\n"); |
|---|
| 305 | |
|---|
| 306 | copy( $input , $output ); |
|---|
| 307 | } |
|---|
| 308 | |
|---|
| 309 | |
|---|
| 310 | while( defined( $input = glob("*.ini") ) ) |
|---|
| 311 | { |
|---|
| 312 | print( "$input going to " ); |
|---|
| 313 | $output = "$local_unix_tsuite_dir"."/"."$input"; |
|---|
| 314 | print("$output\n"); |
|---|
| 315 | |
|---|
| 316 | system "dos2unix < $input > $output"; |
|---|
| 317 | $output = "$local_win_tsuite_dir"."/"."$input"; |
|---|
| 318 | print("$output\n"); |
|---|
| 319 | |
|---|
| 320 | copy( $input , $output ); |
|---|
| 321 | } |
|---|
| 322 | |
|---|
| 323 | |
|---|
| 324 | print("\n=========================\n"); |
|---|
| 325 | print("All tsuite files have been copied to unix/tsuite subdir\n"); |
|---|
| 326 | print("=========================\n"); |
|---|
| 327 | |
|---|
| 328 | |
|---|
| 329 | |
|---|
| 330 | if( !chdir( $original_data_dir ) ) |
|---|
| 331 | { |
|---|
| 332 | printf(" invalid directory for input\n"); |
|---|
| 333 | exit(1); |
|---|
| 334 | } |
|---|
| 335 | |
|---|
| 336 | |
|---|
| 337 | |
|---|
| 338 | |
|---|
| 339 | $input = "readme_data.htm"; |
|---|
| 340 | $output = "$local_unix_data_dir"."/"."readme_data.htm"; |
|---|
| 341 | system "dos2unix < $input > $output" ; |
|---|
| 342 | $output = "$local_win_data_dir"."/"."$input"; |
|---|
| 343 | |
|---|
| 344 | copy( $input , $output ); |
|---|
| 345 | |
|---|
| 346 | |
|---|
| 347 | copy( "clouds.jpg" , "$local_unix_data_dir"."/"."clouds.jpg" ); |
|---|
| 348 | copy( "clouds.jpg" , "$local_win_data_dir"."/"."clouds.jpg" ); |
|---|
| 349 | |
|---|
| 350 | |
|---|
| 351 | |
|---|
| 352 | copy( "vanhoof_grain_model.pdf" , "$local_unix_data_dir"."/"."vanhoof_grain_model.pdf" ); |
|---|
| 353 | copy( "vanhoof_grain_model.pdf" , "$local_win_data_dir"."/"."vanhoof_grain_model.pdf" ); |
|---|
| 354 | |
|---|
| 355 | $input = "vanhoof_grain_model.tex"; |
|---|
| 356 | $output = "$local_unix_data_dir"."/"."vanhoof_grain_model.tex"; |
|---|
| 357 | |
|---|
| 358 | system "dos2unix < $input > $output" ; |
|---|
| 359 | $output = "$local_win_data_dir"."/"."$input"; |
|---|
| 360 | |
|---|
| 361 | copy( $input , $output ); |
|---|
| 362 | |
|---|
| 363 | $input = "vanhoof_grain_model.ps"; |
|---|
| 364 | $output = "$local_unix_data_dir"."/"."vanhoof_grain_model.ps"; |
|---|
| 365 | |
|---|
| 366 | system "dos2unix < $input > $output" ; |
|---|
| 367 | $output = "$local_win_data_dir"."/"."$input"; |
|---|
| 368 | |
|---|
| 369 | copy( $input , $output ); |
|---|
| 370 | |
|---|
| 371 | |
|---|
| 372 | while( defined( $input = glob("*.dat") ) ) |
|---|
| 373 | { |
|---|
| 374 | print( "$input going to " ); |
|---|
| 375 | $output = "$local_unix_data_dir"."/"."$input"; |
|---|
| 376 | print("$output\n"); |
|---|
| 377 | |
|---|
| 378 | system "dos2unix < $input > $output"; |
|---|
| 379 | |
|---|
| 380 | |
|---|
| 381 | print( "$input going to " ); |
|---|
| 382 | $output = "$local_win_data_dir"."/"."$input"; |
|---|
| 383 | print("$output\n"); |
|---|
| 384 | |
|---|
| 385 | copy( $input , $output ); |
|---|
| 386 | } |
|---|
| 387 | |
|---|
| 388 | |
|---|
| 389 | while( defined( $input = glob("*.opc") ) ) |
|---|
| 390 | { |
|---|
| 391 | print( "$input going to " ); |
|---|
| 392 | $output = "$local_unix_data_dir"."/"."$input"; |
|---|
| 393 | print("$output\n"); |
|---|
| 394 | |
|---|
| 395 | system "dos2unix < $input > $output"; |
|---|
| 396 | |
|---|
| 397 | |
|---|
| 398 | print( "$input going to " ); |
|---|
| 399 | $output = "$local_win_data_dir"."/"."$input"; |
|---|
| 400 | print("$output\n"); |
|---|
| 401 | |
|---|
| 402 | copy( $input , $output ); |
|---|
| 403 | } |
|---|
| 404 | |
|---|
| 405 | |
|---|
| 406 | while( defined( $input = glob("*.in") ) ) |
|---|
| 407 | { |
|---|
| 408 | print( "$input going to " ); |
|---|
| 409 | $output = "$local_unix_data_dir"."/"."$input"; |
|---|
| 410 | print("$output\n"); |
|---|
| 411 | |
|---|
| 412 | system "dos2unix < $input > $output"; |
|---|
| 413 | |
|---|
| 414 | |
|---|
| 415 | print( "$input going to " ); |
|---|
| 416 | $output = "$local_win_data_dir"."/"."$input"; |
|---|
| 417 | print("$output\n"); |
|---|
| 418 | |
|---|
| 419 | copy( $input , $output ); |
|---|
| 420 | } |
|---|
| 421 | |
|---|
| 422 | |
|---|
| 423 | while( defined( $input = glob("*.ini") ) ) |
|---|
| 424 | { |
|---|
| 425 | print( "$input going to " ); |
|---|
| 426 | $output = "$local_unix_data_dir"."/"."$input"; |
|---|
| 427 | print("$output\n"); |
|---|
| 428 | |
|---|
| 429 | system "dos2unix < $input > $output"; |
|---|
| 430 | |
|---|
| 431 | |
|---|
| 432 | print( "$input going to " ); |
|---|
| 433 | $output = "$local_win_data_dir"."/"."$input"; |
|---|
| 434 | print("$output\n"); |
|---|
| 435 | |
|---|
| 436 | copy( $input , $output ); |
|---|
| 437 | } |
|---|
| 438 | |
|---|
| 439 | |
|---|
| 440 | while( defined( $input = glob("*.rfi") ) ) |
|---|
| 441 | { |
|---|
| 442 | print( "$input going to " ); |
|---|
| 443 | $output = "$local_unix_data_dir"."/"."$input"; |
|---|
| 444 | print("$output\n"); |
|---|
| 445 | |
|---|
| 446 | system "dos2unix < $input > $output"; |
|---|
| 447 | |
|---|
| 448 | |
|---|
| 449 | print( "$input going to " ); |
|---|
| 450 | $output = "$local_win_data_dir"."/"."$input"; |
|---|
| 451 | print("$output\n"); |
|---|
| 452 | |
|---|
| 453 | copy( $input , $output ); |
|---|
| 454 | } |
|---|
| 455 | |
|---|
| 456 | |
|---|
| 457 | while( defined( $input = glob("*.szd") ) ) |
|---|
| 458 | { |
|---|
| 459 | print( "$input going to " ); |
|---|
| 460 | $output = "$local_unix_data_dir"."/"."$input"; |
|---|
| 461 | print("$output\n"); |
|---|
| 462 | |
|---|
| 463 | system "dos2unix < $input > $output"; |
|---|
| 464 | |
|---|
| 465 | |
|---|
| 466 | print( "$input going to " ); |
|---|
| 467 | $output = "$local_win_data_dir"."/"."$input"; |
|---|
| 468 | print("$output\n"); |
|---|
| 469 | |
|---|
| 470 | copy( $input , $output ); |
|---|
| 471 | } |
|---|
| 472 | |
|---|
| 473 | |
|---|
| 474 | print("\n=========================\n"); |
|---|
| 475 | print("All data files have been copied to trunk/unix/data subdir\n"); |
|---|
| 476 | print("=========================\n"); |
|---|
| 477 | |
|---|
| 478 | print( "data, source, tsuite files copied to win and pc unix \n"); |
|---|
| 479 | |
|---|
| 480 | |
|---|
| 481 | |
|---|
| 482 | |
|---|
| 483 | |
|---|
| 484 | |
|---|
| 485 | if( !chdir( $local_unix_source_dir ) ) |
|---|
| 486 | { |
|---|
| 487 | printf(" invalid local unix source directory for input\n"); |
|---|
| 488 | exit(1); |
|---|
| 489 | } |
|---|
| 490 | |
|---|
| 491 | |
|---|
| 492 | |
|---|
| 493 | while( defined( $input = glob("*") ) ) |
|---|
| 494 | { |
|---|
| 495 | print( "$input going to " ); |
|---|
| 496 | $output = "$cluster_unix_source_dir"."/"."$input"; |
|---|
| 497 | print("$output\n"); |
|---|
| 498 | |
|---|
| 499 | copy( $input , $output); |
|---|
| 500 | } |
|---|
| 501 | |
|---|
| 502 | copy( "u:/cloudy/trunk/path.cpp" , "u:/cloudy/trunk/source/path.cpp" ); |
|---|
| 503 | |
|---|
| 504 | |
|---|
| 505 | if( !chdir( $local_unix_tsuite_dir ) ) |
|---|
| 506 | { |
|---|
| 507 | printf(" invalid directory for local unix tsuite directory\n"); |
|---|
| 508 | exit(1); |
|---|
| 509 | } |
|---|
| 510 | |
|---|
| 511 | |
|---|
| 512 | while( defined( $input = glob("*") ) ) |
|---|
| 513 | { |
|---|
| 514 | print( "$input going to " ); |
|---|
| 515 | $output = "$cluster_unix_tsuite_dir"."/"."$input"; |
|---|
| 516 | print("$output\n"); |
|---|
| 517 | |
|---|
| 518 | copy( $input , $output ); |
|---|
| 519 | } |
|---|
| 520 | |
|---|
| 521 | |
|---|
| 522 | |
|---|
| 523 | if( !chdir( $local_unix_data_dir ) ) |
|---|
| 524 | { |
|---|
| 525 | printf(" invalid directory for local unix data directory\n"); |
|---|
| 526 | exit(1); |
|---|
| 527 | } |
|---|
| 528 | |
|---|
| 529 | |
|---|
| 530 | while( defined( $input = glob("*") ) ) |
|---|
| 531 | { |
|---|
| 532 | print( "$input going to " ); |
|---|
| 533 | $output = "$cluster_unix_data_dir"."/"."$input"; |
|---|
| 534 | print("$output\n"); |
|---|
| 535 | |
|---|
| 536 | copy( $input , $output ); |
|---|
| 537 | } |
|---|
| 538 | |
|---|
| 539 | |
|---|
| 540 | if( !chdir( "$unixhome" ) ) |
|---|
| 541 | { |
|---|
| 542 | printf(" invalid unix home directory for source\n"); |
|---|
| 543 | exit(1); |
|---|
| 544 | } |
|---|
| 545 | print(" moved to unix home directory\n"); |
|---|
| 546 | |
|---|
| 547 | |
|---|
| 548 | if( -e "source.tar.gz" ) |
|---|
| 549 | { |
|---|
| 550 | unlink("source.tar.gz" ); |
|---|
| 551 | } |
|---|
| 552 | |
|---|
| 553 | if( -e "tsuite.tar.gz" ) |
|---|
| 554 | { |
|---|
| 555 | unlink("tsuite.tar.gz" ); |
|---|
| 556 | } |
|---|
| 557 | |
|---|
| 558 | if( -e "data.tar.gz" ) |
|---|
| 559 | { |
|---|
| 560 | unlink("data.tar.gz" ); |
|---|
| 561 | } |
|---|
| 562 | |
|---|
| 563 | |
|---|
| 564 | |
|---|
| 565 | |
|---|
| 566 | |
|---|
| 567 | |
|---|
| 568 | |
|---|
| 569 | if( !chdir( "$local_unix_source_dir" ) ) |
|---|
| 570 | { |
|---|
| 571 | printf(" invalid directory for local unix source\n"); |
|---|
| 572 | exit(1); |
|---|
| 573 | } |
|---|
| 574 | $tarfile = "../"."source.tar"; |
|---|
| 575 | system "tar -cf $tarfile * "; |
|---|
| 576 | print( "about to gzip $tarfile\n" ); |
|---|
| 577 | system "gzip $tarfile "; |
|---|
| 578 | |
|---|
| 579 | |
|---|
| 580 | if( !chdir( "$local_unix_tsuite_dir" ) ) |
|---|
| 581 | { |
|---|
| 582 | printf(" invalid directory for local tsuite source\n"); |
|---|
| 583 | exit(1); |
|---|
| 584 | } |
|---|
| 585 | $tarfile = "../"."tsuite.tar"; |
|---|
| 586 | system "tar -cf $tarfile * "; |
|---|
| 587 | print( "about to gzip $tarfile\n" ); |
|---|
| 588 | system "gzip $tarfile "; |
|---|
| 589 | |
|---|
| 590 | |
|---|
| 591 | if( !chdir( "$local_unix_data_dir" ) ) |
|---|
| 592 | { |
|---|
| 593 | printf(" invalid directory for local data source\n"); |
|---|
| 594 | exit(1); |
|---|
| 595 | } |
|---|
| 596 | $tarfile = "../"."data.tar"; |
|---|
| 597 | system "tar -cf $tarfile * "; |
|---|
| 598 | print( "about to gzip $tarfile\n" ); |
|---|
| 599 | system "gzip $tarfile "; |
|---|
| 600 | |
|---|
| 601 | |
|---|
| 602 | if( !chdir( "$local_unix_main_dir" ) ) |
|---|
| 603 | { |
|---|
| 604 | printf(" invalid directory for main unix\n"); |
|---|
| 605 | exit(1); |
|---|
| 606 | } |
|---|
| 607 | |
|---|
| 608 | |
|---|
| 609 | |
|---|
| 610 | |
|---|
| 611 | copy( "source.tar.gz" , $ftp_last ); |
|---|
| 612 | copy( "tsuite.tar.gz" , $ftp_last ); |
|---|
| 613 | copy( "data.tar.gz" , $ftp_last ); |
|---|
| 614 | |
|---|
| 615 | |
|---|
| 616 | |
|---|
| 617 | |
|---|
| 618 | if( !chdir( "$winhome" ) ) |
|---|
| 619 | { |
|---|
| 620 | printf(" invalid directory for win home\n"); |
|---|
| 621 | exit(1); |
|---|
| 622 | } |
|---|
| 623 | if( -e "source.zip" ) |
|---|
| 624 | { |
|---|
| 625 | unlink("source.zip" ); |
|---|
| 626 | } |
|---|
| 627 | |
|---|
| 628 | if( -e "tsuite.zip" ) |
|---|
| 629 | { |
|---|
| 630 | unlink("tsuite.zip" ); |
|---|
| 631 | } |
|---|
| 632 | |
|---|
| 633 | if( -e "data.zip" ) |
|---|
| 634 | { |
|---|
| 635 | unlink("data.zip" ); |
|---|
| 636 | } |
|---|
| 637 | |
|---|
| 638 | |
|---|
| 639 | system "c:\\u\\wzzip source.zip $local_win_source_dir "; |
|---|
| 640 | system "c:\\u\\wzzip tsuite.zip $local_win_tsuite_dir "; |
|---|
| 641 | system "c:\\u\\wzzip data.zip $local_win_data_dir "; |
|---|
| 642 | |
|---|
| 643 | |
|---|
| 644 | |
|---|
| 645 | |
|---|
| 646 | |
|---|
| 647 | copy( "source.zip" , $ftp_last ); |
|---|
| 648 | copy( "tsuite.zip" , $ftp_last ); |
|---|
| 649 | copy( "data.zip" , $ftp_last ); |
|---|
| 650 | |
|---|
| 651 | print("\n=========================\n"); |
|---|