Unix codesys csh shell scripts  (scriptes in $CODESYSDIR/csh) 

General Purpose:

Check the file system:

ckdirs check that all directories needed by transp do exist
cklocal check that needed subdirectories of $LOCAL do exist
tokdir check that work and data directories exist for known tokamaks

Searching source code:

allsearch search entire code for strings
progsearch search a program source for strings
libsearch search a library source for strings
inclist list INCLUDE files assocated with source or library
libincls derive library include list from member make files

Filename filtering:

cfilter filter out all but "compilable" filenames
dfilter filter out all but "compilable" + .doc + .inf files
efilter filter out names not of the form name.ext

'Make' code checking:

 - regenerate if necessary- regenerate if necessary
checkmake check all make code
checklib check a library make file
checklink check a program make file

Source filename checking:

checkfiles check source files; send mail if error detected.
checknames check names of all source files
check1name check 1 name of 1 source
unique check uniqueness of source names in one source library
all_unique check uniqueness of source names in all libraries

Finding source files:

cmsfind find a specific source element
listelem list all elements with specified substring in their names
scfind source finder subprocedure

Generating make files:

cmsmms gen make files for free object or subroutine library
cmsmms_obj cmsmms subprocedure
makelink gen make files for executables
genmake unconditionally regen all make files
make_it_all make generator for export version of system

Executing makes:

uplib update a subroutine library
uplink update an executable program
rebuild_lib completely rebuild a library
rebuild_prog rebuild a program; recompile driver modules.
recompile_all delete all binaries, recompile everything
check_nag check for recompilation of nag library due to changes
check_sglib check for recompilation of sglib library due to changes
maketest change detector script for check_nag and check_sglib.
make_sglib rebuild sglib library (unconditional)
ckcontents check for deleted source elements force rebuild of subroutine library if source modules have been removed.
finishlib finish updating a library.

Code maintenance scripts:

code_daemon execute daily  (??)
checknames 
checkmake 
linkcheck run all make procedures

Compilation "primitives":

tcomp compile code
dcomp debug compile code
liscomp compile code for compiler listing output only
linkload load executables

Debug environment:

dbxclear clear the debug element list.
dbxcleanup dbxclear & cleanup the debug directory.
dbxadd add a name to the debug element list.
dbxlist show contents of debug list.
dbxsave make named copy of list for later use.
dbxrestore restore named copy.
dbx_hide <libname> hide named library from "dbxadd"
dbx_unhide <libname> restore visibility of named library
dbx_nohide make all libraries visible
dbx_hidden show list of currently hidden libraries.
getfile copy specified file into debug area
getgroup copy entire source library into debug area

Debug operation:

udebug build debug make file (executable)
udblib build debug make file (library)
udbobj build debug make (object)
get_dbobjs script to help build debug executables

Creating new elements:

new_library create source area for new subroutine library
new_program create source area for new executable program
new_misclib create source area for documentation / miscellaneous
new_source create a new source element

Installing changes:

wkinstall install changes from debug area into main source areas.

Discarding unwanted elememts:

destroy_source destroy a source element (by renaming).
destroy_library destroy a library (turn sources into "documentation").
destroy_program destroy a program (turn sources into "documentation").
eliminate really delete a source directory and related directories.

TRANSP operations:

activate get a template namelist for a new run, from an old run
enqueue primitive run queueing facility
finishup move a completed run from work area to results area
getrunpid get pid of TRANSP run or controlling process
haltrun halt a TRANSP run and controlling process
label produce RPLOT labels for a TRANSP run
plotcon postprocess TRANSP output into binary form for RPLOT
restart_check check/restart TRANSP runs after system crash
rmonitor show status of executing TRANSP runs
runtr start a TRANSP run
runtrx TRANSP run control script
trlook produce binary RPLOT files for a TRANSP run that is still running

TRANSP debugging:

nb_debug setup debug run with plotting version of beam code
add_nb_debug help nb_debug setup debug run with plotting version of beam code

SIGTAB and friends:

make_all_tables regenerate atomic and nuclear physics cross sections
make_atomic_tables gen atomic physics cross sections
make_fusion_tables gen fusion cross sections
make_exc_tables make excited states atomic physics tables

TRANSP code development (temp versions):

do_build run transp build; new COMMON and namelist
do_plotgen run plotgen; new output data set
do_trdatgen run trdatgen; new input data set
ckremove check/remove obsolete generated sources
cginstall install changed generated sources
cpdiff check if a generated source has changed from the old version

Miscellaneous:

cshmail send a mail mesage
count_source count the number of source elements in the system
define_bs source this to create a symbol for the backslash character
diskusage measure disk usage of all files in a directory tree
delete_make delete all make and marker files
delete_source delete all source files and compsc copies.
lsdir list files in a named directory; simple format.
move_to_backup mv file xyz to xyz~
run_fpp run the xfpprf program.
sortlist sort command line arguments
supsub substitute strings in range of text files
tolower convert string to lower case
toupper convert string to upper case
tripdig output a number in i3.0 format