psPortCode

Description

     This program generates a Korn shell script.  The Korn shell script
recursively copies files from one directory structure to another.  It is
like 'cp -R' is this respect.   In addition, the script will change
the name of a file substituting a new string for each instance it finds
an old string in the name.   The script also replaces the same occurances
of the old string with the new string in text files.   This program
deems a file a text file if it has an ending which matches one of the
'text file endings' below.

 

Syntax

psPortCode -Dtemplate_directory -dnew_directory -Sold_string -snew_string
-Pstring_pairs_file -Ttext_file_endings -Fscript_name -Ooptions

 

Arguments

-D

Name of template directory [current directory]

-d

Name of new empty directory

-S

Old string [Linux]

-s

New string

-P

Old string-new string pairs file

-T

Text file endings [.c .cc .cpp .h .hpp .mh Makefile .csh .ksh .sh .txt .list]

-F

Output Korn shell script [standard output]

-O

Options

 

Options

l

Convert lower case equivalents too

u

Convert upper case equivalents too

 

Environment Variables Behind the Scenes

PS_SYSMSG_FILE

For the location of the system-wide messages file.

 

Notes

     If you specify a string-pairs file, this program also replaces strings within
your text files according to the old and new values specified in the file.  The
names of the files themselves, gets changed according only to the -S and -s
arguments and whether you specify -Ou, -Ol or -Olu.
     To replace the lower case equivalents of your strings (-S) within your
 text files, specific -Ol.   For upper case, -Ou.   -Olu replaces both the
 lower and upper case equivalents of your strings within text files.
     We use this program to begin porting PS from one platform to another or
when replacing strings in the entire system.
     For example, we want to use the PS/os/Linux directory as a template for the
code base of HPUX.   This program generates the script to copy all the Linux files
to the HPUX directory.   Any file name that has 'Linux' it in, this program
changes 'Linux' to 'HPUX'.   Any 'Linux' found in .cc, .h and Makefile this
program replaces with 'HPUX'.

 

Go to DBPowerSuite 7.9 List of Programs.


Updated: Thu Jun 18 21:12:26 2009