| 266 | {{{ |
| 267 | #================================================== |
| 268 | LibIGCM_sys for Mercure |
| 269 | #================================================== |
| 270 | |
| 271 | This ksh library if a layer under some usefull |
| 272 | environment variables and shell commands. |
| 273 | All those definitions depend on host particularities. |
| 274 | It manages a stack mechanism and test validity of operations. |
| 275 | All function described bellow must be prefixed by IGCM_sys. |
| 276 | |
| 277 | #================================================== |
| 278 | Program used in libIGCM |
| 279 | #================================================== |
| 280 | #================================================== |
| 281 | function IGCM_sys_RshPost |
| 282 | * Purpose: Master rsh command |
| 283 | * Examples: |
| 284 | |
| 285 | #================================================== |
| 286 | function IGCM_sys_Mkdir |
| 287 | * Purpose: Master locale mkdir command |
| 288 | * Examples: |
| 289 | |
| 290 | #================================================== |
| 291 | function IGCM_sys_MkdirArchive |
| 292 | * Purpose: Mkdir on Archive |
| 293 | * Examples: |
| 294 | |
| 295 | #================================================== |
| 296 | function IGCM_sys_MkdirWork |
| 297 | * Purpose: Mkdir on Work |
| 298 | * Examples: |
| 299 | |
| 300 | #================================================== |
| 301 | function IGCM_sys_Cd |
| 302 | * Purpose: master cd command |
| 303 | * Examples: |
| 304 | |
| 305 | #================================================== |
| 306 | function IGCM_sys_Chmod |
| 307 | * Purpose: Chmod |
| 308 | * Examples: |
| 309 | |
| 310 | #================================================== |
| 311 | function IGCM_sys_FileSize |
| 312 | * Purpose: Filesize |
| 313 | * Examples: |
| 314 | |
| 315 | #================================================== |
| 316 | function IGCM_sys_TestDir |
| 317 | * Purpose: Test Directory that must exists |
| 318 | * Examples: |
| 319 | |
| 320 | #================================================== |
| 321 | function IGCM_sys_TestDirArchive |
| 322 | * Purpose: Test Directory that must exists on Archive |
| 323 | * Examples: |
| 324 | |
| 325 | #================================================== |
| 326 | function IGCM_sys_TestFileArchive |
| 327 | * Purpose: Test file that must NOT EXISTS on Archive |
| 328 | * Examples: |
| 329 | |
| 330 | #================================================== |
| 331 | function IGCM_sys_Tree |
| 332 | * Purpose: Tree directories with files on ${ARCHIVE} |
| 333 | * Examples: IGCM_sys_Tree ${R_IN} ${R_OUT} |
| 334 | |
| 335 | #================================================== |
| 336 | function IGCM_sys_Tar |
| 337 | * Purpose: master un-tar command |
| 338 | * Examples: |
| 339 | |
| 340 | #================================================== |
| 341 | function IGCM_sys_UnTar |
| 342 | * Purpose: master un-tar command |
| 343 | * Examples: |
| 344 | |
| 345 | #================================================== |
| 346 | function IGCM_sys_Qsub |
| 347 | * Purpose: Qsub new job |
| 348 | * Examples: |
| 349 | |
| 350 | #================================================== |
| 351 | function IGCM_sys_QsubPost |
| 352 | * Purpose: Qsub new job on scalaire |
| 353 | * Examples: |
| 354 | |
| 355 | ************************* |
| 356 | File transfer functions |
| 357 | ************************* |
| 358 | |
| 359 | #================================================== |
| 360 | function IGCM_sys_Rsync_out |
| 361 | * Purpose: treat return val of rsync |
| 362 | * Examples: IGCM_sys_Rsync_out out_RET_rsync |
| 363 | Error values and explanations can depend on your system version. |
| 364 | #================================================== |
| 365 | function IGCM_sys_Cp |
| 366 | * Purpose: generic cp |
| 367 | * Examples: |
| 368 | |
| 369 | #================================================== |
| 370 | function IGCM_sys_Mv |
| 371 | * Purpose: generic move |
| 372 | * Examples: |
| 373 | |
| 374 | #================================================== |
| 375 | function IGCM_sys_Put_Rest |
| 376 | * Purpose: Put computied restarts on $(ARCHIVE). |
| 377 | File and target directory must exist. |
| 378 | * Examples: |
| 379 | |
| 380 | #================================================== |
| 381 | function IGCM_sys_Put_Out |
| 382 | * Purpose: Copy a file on $(ARCHIVE) after have chmod it in readonly |
| 383 | * Examples: |
| 384 | |
| 385 | #================================================== |
| 386 | function IGCM_sys_Get |
| 387 | * Purpose: Get a file from ${ARCHIVE} |
| 388 | * Examples: IGCM_sys_Get myfile /destpath/myfile_with_PREFIX |
| 389 | IGCM_sys_Get /l Array_contain_myfiles /destpath/ |
| 390 | |
| 391 | #================================================== |
| 392 | function IGCM_sys_GetDate_FichWork |
| 393 | * Purpose: donne la date filesys d'un fichier sur le filesystem WORK |
| 394 | * Examples: |
| 395 | |
| 396 | #================================================== |
| 397 | function IGCM_sys_GetDate_FichArchive |
| 398 | * Purpose: donne la date filesys d'un fichier sur le filesystem ARCHIVE |
| 399 | * Examples: |
| 400 | }}} |