Overview

LRIS software is installed in two different architectures: Solaris and Linux. There are two kroot directories. Scripts that run on linux and Solaris have different kroot directories. In what follows we describe the procedure to update scripts and put them on svn. There are two script types that may be modified. Scripts other than those written in Perl may have any name convention. Perl script should have a file suffix of ".sin" and contain in the first line an alias for perl (see the template example below).

Procedure for modifying software in the kroot directory tree for LRIS.

LINUX

All LRIS Linux hosts will run the kroot installed from the lrisbuild virtual machine. To make changes, one would:
  • If modifing an existing script, modify the script or its corresponding *.sin file.
  • If creating a new script:
  • use make install wherever you changed something
  • Test whatever it is you installed. Anything that just uses keywords (like scripts) will run just fine on the build host.
  • When you feel like saving your progress make sure to issue svn commit
  • When you are ready to deploy your changes to the rest of the Linux hosts-- lris, lrismonored-- you need to kdeploy -a
  • Now check that the script works in the released code. Run it as lriseng and a numbered account on lris.
  • Solaris

    The procedure for manuka is simpler in one respect and more complicated in another. There is no concept of deployment because it's a Solaris machine; you don't have direct svn access for the same reason. To install and test changes, you start with:

    Script Template for non perl scripts

    Template below is found in the ~lris_sh dir.
    #!/usr/local/bin/tcsh -f
    # 
    # Name:
    #       script_template
    #
    # Purpose:
    #       
    # 
    # Usage:
    #       
    # where:
    #       
    # 
    # Output:
    #       
    # 
    # Modification history:
    #       2000-Jul-25     MK      template version
    #-----------------------------------------------------------------------
    
    # if debugging, do not make motor moves...
    if ( "$1" == "-debug" ) then
      echo "Entering DEBUG MODE!"
      echo ""
      shift
    endif
    
    exit
    

    Perl Script Template

    Template below is found in the ~lris_sh dir.
    #!@PERL@ -w
    #+
    # NAME:  template 
    #
    # Purpose:
    #       Do nothing but provide a template for future use.
    #
    # Usage:
    #       template -debug
    #
    # Arguments:
    #       -debug = debug mode
    #
    # Output:
    #       to STDOUT
    #
    # Restrictions:
    #       none
    #
    # Exit values:
    #
    # Example:
    #
    # Modification history:
    #       2006-Dec-20     MK    template version
    #-----------------------------------------------------------------------
    
    # check for -verbose flag...
    global verbose
    set verbose 0
    if { [lsearch -regexp $argv {^-v}] > -1 } {
        set verbose 1
    }
    
    # check for -debug flag...
    global debug
    set debug 0
    if { [lsearch -regexp $argv {^-d}] > -1 } {
        set debug 1
        set verbose 1
    }
    
    if { $debug }{echo "DEBUG MODE"}
    if { $verbose } {echo "Verbose triggered"}