Next: , Previous: README, Up: Top


2 INSTALL

# --------------------------------------------------------------------
# $Source: /webcvs/uqjau/uqjau/INSTALL.html,v $
# $Date: 2013/08/04 20:41:01 $ GMT    $Revision: 1.9 $
# --------------------------------------------------------------------

Dependencies
============
The installer uses bash, and make.

Basic Installation
==================

The 'setup' script will untar all the script packages below the
the top level install directory specified by the -i switch.  It
also sets up symbolic links to scripts in a 'commands' directory
under the install directory, that you may add to your PATH.

Installation Names
==================

There is no suggested default install directory.  If you do not
pass '-i INSTALL_DIR' to 'setup', then the install is to a temp
dir below /tmp.

Example Work Steps for Install
==============================
You may cut and paste the suggested shell commandline snips
that follow, one line at a time.  None of the environmental
variables defined will be needed after the install is done.

Untar uqjau.tar.gz in any temp directory.
"cd" to the uqjau sub dir created.

  cd uqjau

Decide on install dir for uqjau tools, 
and set env var INSTALL_DIR accordingly:

  INSTALL_DIR=~/utils/local/uqjau
    # Adjust to the install pathname you want.  Perhaps below
    # /usr/local, if you want to share uqjau tools with others.
    # The dirname for INSTALL_DIR does not have to be 'uqjau'.

  mkdir -vp $INSTALL_DIR

  # -------------------------------------------------------------------- 
  # Install uqjau tools
  # -------------------------------------------------------------------- 
  
  ./setup -i $INSTALL_DIR


-- All done. --

# ==================================================================== 
# uqjau tests, try these commands:
# ==================================================================== 

# Ensure $INSTALL_DIR/commands/cur is in your PATH for this shell session.

  PATH=$PATH:$INSTALL_DIR/commands/cur

# Define a couple of temporary env vars to make typing easier:
  _c=$INSTALL_DIR/scommands/cur   _p=$INSTALL_DIR/package/cur

# try:

  _ls -v | less  # synopsis of most scripts and bash functions

  _txt /etc/passwd  ## count UNIX and DOS lines separately

  find /etc -type f 2>/dev/null |$_c/ls_tsid_filter |sort -r -k1,1 |less
    # sort a dir tree by timestamp

  $_c/jobmon -L ~/toss_now -t -m 'date|tr' a-z A-Z
    # wrapper for logging "jobs" - either scripts or 1 line shell commands

  $_c/tsid.pl
    # A base36 timestamp.

  nap2 7:15am next thursday  # ^C this to kill sleep

# ==================================================================== 
# -- optional, but suggested --
# Configure uqjau tools
# ==================================================================== 

Some of the uqjau scripts need environmental variables:
_29eloc, _29team, _29lg to be set at script startup by reading
.../main/etc/dirdefs.  

  less $INSTALL_DIR/package/cur/main/etc/dirdefs
    # Comments explain _29eloc, _29team, _29lg environmental variables.

In your current shell session set wanted values for _29eloc, _29team, 
and _29lg (hints, you may use or edit to your needs):

  eval _29eloc=\~$(id -un)/mock-root/etc/local
    # If you have root permissions you might set this to /etc/local.

  _29team=$_29eloc/team/myteam
    # Swap in better name than "myteam".  Settings worth sharing with others.
    #
    # If you have the iBASHrc aliases and functions setup then
    # you should already have env var '_t' defined, so use that pathname:
    #   _29team=$_t

  eval _29lg=\~$(id -un)/mock-root/var/local/team/${_29team##*/}/log
    # above sets _29lg parent dirname equal to $(dirname $_29team)

Create the corresponding directories:

  mkdir -vp  $_29eloc $_29team $_29lg

Now setup 'dirdefs' config file:

  cd $INSTALL_DIR/package/cur/main/etc

  # paste in the next 4 lines, to get hint for dirdefs edits:
  echo "
    _29eloc=$_29eloc
    _29team=$_29team
    _29lg=$_29lg "  ##
  
  true;${EDITOR:-vim} $INSTALL_DIR/package/cur/main/etc/dirdefs
    # use hint from above echo output to drive your edits 

#-- update a dependent file:

  cd $INSTALL_DIR/package/cur/main/etc && rm -f dirdefs.perl
  PATH="$INSTALL_DIR/commands/cur:$PATH" make dirdefs.perl
    # dirdefs.perl depends on the dirdefs you just edited

# ==================================================================== 
# - optional -
# Consider installing "iBASHrc" - a set of GPL'd scripts to customize your
# bash login shell w/aliases, functions, and env vars; many of
# these are "general", a few support uqjau tools.
# ==================================================================== 

  true;[[ -d ~/tmp ]] && cd ~/tmp || cd /tmp;wget http://trodman.com/pub/iBASHrc.tar.gz
    # follow it's INSTALL and README

download: http://download.savannah.gnu.org/releases/uqjau/