App Requirements

Require an application which composes a stand-alone single file shell application, conventionally starting with a sh-bang: #!

These are the specific requirements for the app.app

User (developer) Requirements

  1. The application family must have an entry subfunction returning the names of the various entry points to the application.

  2. The application family must have a scripts subfunction returning the names of the scripting applications used in the functions. It may return nothing.

Gather all functions

  1. A tool to recursively descend the entry_points function call graph, returning the names of the called functions.
  2. Construct a stand-alone library containing all the functions, storing in an _app suffix

Gather local tools

  1. Identify and collect the various script files
  2. Identify and provide for download of locally installed tools. Non /bin, /usr/bin, e.g. /usr/local/bin

Identify and Provide for System Tools

  1. Identify supported O/S, Bash Version
  2. Identify versions of system /bin, /usr/bin tools

Convert library format to Shell Script

  1. Wrap the stand-alone _app library with an entry point function call
  2. replace return codes as exit.

Discussion

Entry Subfunction

An entry subfunction looks like this:

graf_entry () 
{ 
    : date: 2020-01-22;
    ${*:-echo} graf graf_copy graf_entry graf_init graf_list graf_main graf_prep graf_scenario
}

Executable Entry Point

A single entry point is turned into an application, in this example a file on the user's PATH named family_subfunction

#! /bin/bash
 ... { the text of family_app } ...
family_main "$@"

Script Subfunctions

A user function finds all the files used by local tools

for suf in $(script_sufs $(family_scripts))
do
    find ${1:-$BASE_DIRECTORY} -name "*.$suf"
done

where script_suf converts application names to appropriate file suffix. Or returns it's argument

References

Definitions

Three definitions define sets of functions, distinguishing the need for the collection: the app, family, and library. The library is the most general, the app being the most specific. The relationship is discussed in The Standard Function Library.

Where these definitions appear in requrements documents, they assume a certain implementation, in particular the definition of a tag. Since the null-operator, a gift from the shell designers, uses the colon, it seems appropriate to use the colon as the distinguishing feature of a tag, .e.g.

date: 2020-02-20  this change ....

Documents

These local papers are housed in the author's section of his commonplace book, which references The Function Standard. On your first visit here, start with README

Standards Documents

Application Requirements

Practice Documents

External References