Skip to content
oxnz edited this page Dec 9, 2014 · 1 revision

install

The install script under tool is intend to one line install

intenal-design

The install script separate the install progress to several state:

1. initialize stage

This state first define global variables and some common functions such as error display and clean-up, etc., then parse the command line arguments and set the corresponding variable for later use.

This stage does not generate any files or directories.

global variable:

  • PROGNAME program name, original is 'INSTALL'
  • VERBOSE verbose level, original is 0
  • DEBUG whether in debug mode
  • LOGFILE log file will generated

functions

  • msgdump display a message
  • errdump display error message, this function prefix the message by PROGNAME and error level, then call the msgdump and redirect msgdump's output to stderr
  • clean clean all the generated stuff on incomplete install

2. install state

This stage will do all the write things

  1. download the archive
  2. extract to .shell under HOME directory
  3. invoke the bootstrap undef ~/${HOME}/.shell/tool/bootstrap

3. finalize stage

This stage report the install info, i.e. what is installed, install to where and etc.

Clone this wiki locally