1
0
mirror of synced 2026-01-25 03:55:42 +00:00
Frank Halasz 1968021bb4
Update loadup and medley scripts to use "tag" instead of "branch"; add ability to completely delete tagged loadups rather than just thin them (#2249)
* WIP in changing loadups to tagged nomeclature rather that branch and ability to delete tagged branches as well as thin them.

* In loadup and medley scripts, changed the --branch (-br) command line argument to --tag (-tg).  Correspondingly changed the MEDLEYDIR/loadups/branches directory to be MEDLEYDIR/loadups/tagged.  Separately, added a + parameter to the --thinw and --thinl command line arguments which causes ALL files to be deleted, not just the versioned files.  Added a --thin command line argument that is equivalent to --thinw followed by --thinl.  Updated the man page to reflect all these changes.

* Updated medley script man page to reflect the new tag nomenclature instead of branch nomenclature.

* Fix issue#2063 - typo in medley man page

* 1) In loadup script made --help (-h) be a synomym of --man (-z).  2)  In both loadup and medley scripts added an optional parameter (+) to the --man (z) command line argument that when specified will display the man page without paging - i.e., sets the pager to cat.

* Fix Issue#2251 LOADUPSDIRECTORIES settings by the MEDLEYDIR fn now takes into account tagged loadups
2025-08-20 11:00:53 -07:00

325 lines
14 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1>NAME</h1>
<p><strong>loadup</strong> — runs a loadup procedure for Medley
Interlisp</p>
<h1>SYNOPSIS</h1>
<p><strong>&lt;MEDLEYDIR&gt;/scripts/loadup</strong> [ options ... ]</p>
<h1>DESCRIPTION</h1>
<p>Runs all or part of the <strong>loadup</strong> procedure for Medley
Interlisp. The loadup procedure is used to create the standard sysout
files from which you can start a Medley session as well as other
standard files that are useful in running Medley. After cloning Medley
from GitHub or after making significant changes to the Medley source,
you need to run the loadup procedure to (re)create these standard
files.</p>
<p>The complete loadup procedure happens in 5 sequential stages with
each stage depending on successful completion of the previous stage.
There are two other non-sequential stages (Aux and DB), which depend
only on the completion of Stage 4 (full.sysout).</p>
<p>You need not run all 5 stages, depending on what sysout files you
need to create for your work. The target files created in each stage are
copied into a loadups directory (&lt;MEDLEYDIR&gt;/loadups). The
<em>medley</em> run script and other Medley tools look for these files
in the loadups directory.</p>
<p>The 5 sequential stages and their main products are:</p>
<blockquote>
<ol type="1">
<li><p><strong>Init:</strong> create an <em>init.dlinit</em> sysout
file. This init.dlinit file is used internally for Stage 2 and is not
copied into the loadups directory.</p></li>
</ol>
</blockquote>
<blockquote>
<ol start="2" type="1">
<li><p><strong>Mid:</strong> create an <em>init-mid.sysout</em>. This
init-mid.sysout is used only internally for Stage 3 and is not copied
into the loadups directory.</p></li>
</ol>
</blockquote>
<blockquote>
<ol start="3" type="1">
<li><p><strong>Lisp:</strong> create <em>lisp.sysout</em>. Lisp.sysout
has a minimal set of Medleys functionality loaded and can be used as
the basis for running a stripped-down Medley session. Lisp.sysout is
copied into the loadups directory.</p></li>
</ol>
</blockquote>
<blockquote>
<ol start="4" type="1">
<li><p><strong>Full:</strong> create <em>full.sysout</em>. Full.sysout
has all of the “standard” set of Medley functionality loaded and is the
primary sysout used for running Medley sessions. Full.sysout is copied
into the loadups directory.</p></li>
</ol>
</blockquote>
<blockquote>
<ol start="5" type="1">
<li><p><strong>Apps:</strong>: create <em>apps.sysout</em>. Apps.sysout
includes everything in full.sysout plus the Medley applications Buttons,
CLOS, Rooms, and Notecards.</p></li>
</ol>
</blockquote>
<p>The two independent stages that can be run if the first 4 sequential
stages complete successfully are:</p>
<blockquote>
<ul>
<li><p><strong>Aux:</strong>: create the <em>whereis.hash</em> and
<em>exports.all</em> files. These are databases that are commonly used
when working on Medley source code. They are copied into the loadups
directory.</p></li>
<li><p><strong>DB:</strong>: creates the <em>fuller.database</em> file.
Fuller.database is a Mastercope database created by analyzing all of the
source code included in full.sysout. (Stage 4) Fuller.database is copied
into the loadups directory.</p></li>
</ul>
</blockquote>
<p>Loadup does all of its work in a work directory
(&lt;MEDLEYDIR&gt;/loadups/build). The target files are copied from this
work directory to the loadups directory if the loadup is successful.
Each stage of the loadup also creates a dribble file containing the
terminal output from within the Medley environment. These dribble files
are also copied to the loadups directory, but also remain available in
the work directory after the loadup completes.</p>
<p>If &lt;MEDLEYDIR&gt; is a git directory, then a file is created in
the loadups output directory called <em>gitinfo</em> which contains the
git commit, git branch and git status information for the directory at
the time the loadup is run.</p>
<p>Only one instance (per &lt;MEDLEIDIR&gt;) of loadup can be run at a
time. There is lock file to prevent simultaneous loadups in the work
directory (named <strong><em>lock</em></strong>) that can be manually
removed. The lock can also be automatically overridden (see the
override flag below). Alternatively, if a lock is encountered at run
time, the user will be asked to choose whether to override or simply
exit the loadup.</p>
<p>Note: <strong>MEDLEYDIR</strong> is an environment variable set by
the loadup script. It is set to the top level directory of the Medley
installation that contains the specific loadup script that is invoked
after all symbolic links are resolved. In the standard global
installation this will be /usr/local/interlisp/medley. But Medley can be
installed in multiple places on any given machine and hence MEDLEYDIR is
computed on each invocation of loadup.</p>
<h1>OPTIONS</h1>
<dl>
<dt><strong>-z [+], --man [+], -man [+], -h [+], help [+]</strong></dt>
<dd>
<p>Print this manual page on the screen. If the <strong>+</strong>
parameter is specified, then no pager is used when displaying the man
page.</p>
</dd>
<dt><strong>-t STAGE, --target STAGE, -target STAGE</strong></dt>
<dd>
<p>Run the sequential loadup procedure until the STAGE is complete,
starting from the files created by the previously run STAGE specified in
the start option.</p>
<p>STAGE can be one of the following:</p>
<blockquote>
<p>i, init, 1: Run the loadup sequence through Stage 1 (init.dlinit).
Init.dlinit is <em>not</em> copied into the loadups directory.</p>
</blockquote>
<blockquote>
<p>m, mid, 2: Run the loadup sequence through Stage 2 (init-mid.sysout).
Init-mid.sysout is <em>not</em> copied into the loadups directory.</p>
</blockquote>
<blockquote>
<p>l, lisp, 3: Run the loadup sequence through Stage 3 (lisp.sysout).
Lisp.sysout is copied into the loadups directory.</p>
</blockquote>
<blockquote>
<p>f, full, 4: Run the loadup sequence through Stage 4 (full.sysout).
Full.sysout is copied into the loadups directory.</p>
</blockquote>
<blockquote>
<p>a, apps, 5: Run the loadup sequence through Stage 5 (apps.sysout).
Also run the Aux stage as if aux option had been specified. Apps.sysout
and the Aux files are copied into the loadups directory.</p>
</blockquote>
<blockquote>
<p>a-, apps-, 5-: Run the loadup sequence through Stage 5 (apps.sysout).
The Aux stage is not run unless otherwise specified. Apps.sysout is
copied into the loadups directory. Also run the Aux stage as if aux
option had been specified.</p>
</blockquote>
</dd>
<dt><strong>-s STAGE --start STAGE, -start STAGE</strong></dt>
<dd>
<p>Start the loadup process using the files previously created by STAGE.
These files are looked for first in the loadups directory or, if not
found there, in the work directory. It is an error if the files created
by STAGE cannot be found.</p>
<p>STAGE can be one of the following:</p>
<blockquote>
<p>s, scratch, 0 : Start the loadup process from the beginning. This is
the default.</p>
</blockquote>
<blockquote>
<p>i, init, 1 : Start the loadup process using the files created by
Stage 1 (init.dlinit).</p>
</blockquote>
<blockquote>
<p>m, mid, 2 : Start the loadup process using the files created by Stage
2 (init-mid.sysout).</p>
</blockquote>
<blockquote>
<p>l, lisp, 3 : Start the loadup process using the files created by
Stage 3 (lisp.sysout)</p>
</blockquote>
<blockquote>
<p>f, full, 4 : Start the loadup process using the files created by
Stage 4 (full.sysout).</p>
</blockquote>
</dd>
<dt><strong>-x, --aux, -aux</strong></dt>
<dd>
<p>Run the Aux loadup stage, creating the <em>whereis.hash</em> and
<em>exports.all</em> files. If loadup completes successfully, these
files are copied into loadups.</p>
</dd>
<dt><strong>-b, --db, -db</strong></dt>
<dd>
<p>Run the DB loadup stage, creating the <em>fuller.database</em> file.
If this stage complete successfully, these files are copied into
loadups.</p>
</dd>
<dt><strong>-i, --init, -init, -1</strong></dt>
<dd>
<p>Synonym for “target init”</p>
</dd>
<dt><strong>-m, --mid, -mid, -2</strong></dt>
<dd>
<p>Synonym for “target mid”</p>
</dd>
<dt><strong>-l, --lisp, -lisp, -3</strong></dt>
<dd>
<p>Synonym for “target lisp”</p>
</dd>
<dt><strong>-f, --full. -full, -4</strong></dt>
<dd>
<p>Synonym for “target full”</p>
</dd>
<dt><strong>-a, --apps, -apps, -5</strong></dt>
<dd>
<p>Synonym for “target apps”</p>
</dd>
<dt><strong>-a-, --apps-, -apps-, -5-</strong></dt>
<dd>
<p>Synonym for “target apps”</p>
</dd>
<dt><strong>-ov, --override, -override</strong></dt>
<dd>
<p>Automatically override the lock that prevents two loadups from
running simultaneously. If this flag is not set and an active lock is
encountered, the user will be asked to choose whether to override or
exit.</p>
</dd>
<dt><strong>-tg [ TAG | -], --tag [ TAG | - ]</strong></dt>
<dd>
<p>By default the sysouts and other files produced by loadup are placed
at the top level of the &lt;MEDLEYDIR&gt;/loadups directory. If this
flag is specified, then the sysout and other output files are placed in
the directory &lt;MEDLEYDIR&gt;/loadups/tagged/TAG. If TAG is “-” or not
specified at all, then TAG is the name of the currently active git
branch of &lt;MEDLEYDIR&gt;, except if git is not installled on the
current system or if &lt;MEDLEYDIR&gt; is not a git directory, in which
case then this flag is ignored. TAG can contain alphanumerics, dashes,
underscores,and periods. Any other character is replaced by an
underscore. The medley script has a corresponding --tag (-tg) argument
to load these sysout files.</p>
</dd>
<dt><strong>-nc, --nocopy, -nocopy</strong></dt>
<dd>
<p>Run the specified loadups, but do not copy results into loadups
directory.</p>
</dd>
<dt><strong>-tw [+], --thinw [+], -thinw [+]</strong></dt>
<dd>
<p>Before running loadups (if any), thin the working directory by
deleting all versioned (<em>.~[0-9]</em>~) files therein. If the
<strong>+</strong> parameter is used, then instead of deleting just the
versioned files, the working directory (and all files and subdirectories
it contains) is deleted.</p>
</dd>
<dt><strong>-tl [+], --thinl [+], -thinl [+]</strong></dt>
<dd>
<p>Before running loadups (if any), thin the loadups directory by
deleting all versioned (<em>.~[0-9]</em>~) files except for those
contained in the working directory. If the <strong>+</strong> parameter
is used, then instead of deleting just the versioned files, all files
and subdirectories are deleted except for those contained in the working
directory. If <strong>+</strong> is used and there is no working
directory and <em>tag TAG</em> is also specified, then the tagged
loadups directory (&lt;MEDLEYDIR&gt;/loadups/tagged/TAG) is also
deleted.</p>
</dd>
<dt><strong>-th [+], --thin [+], -thin [+]</strong></dt>
<dd>
<p>Equivalent to specifying both -tw [+] and -tl [+]. If <em>tag
TAG</em> is also specified and the <strong>+</strong> parameter is used
here, then the tagged loadups directory
(&lt;MEDLEYDIR&gt;/loadups/tagged/TAG) is removed.</p>
</dd>
<dt><strong>-d DIR, --maikodir DIR, -maikodir DIR</strong></dt>
<dd>
<p>Use DIR as the directory from which to execute lde (Miko) when
running Medley in the loadup process. If this flag is not present, the
value of the environment variable MAIKODIR will be used instead. And if
MAIKODIR does not exist, then the default Maiko directory search within
Medley will be used.</p>
</dd>
<dt><strong>-v, --vnc, -vnc</strong></dt>
<dd>
<p>Relevant to Linux (including WSLv1 and WSLv2) platforms only. Use
Xvnc for the Medley display during this loadup. By default, the Medley
display will use X Windows. This flag is most useful on Windows System
for Linux v1, where Xvnc is commonly used in running Medley in the
absence of an Xwindows server.</p>
</dd>
</dl>
<h1>DEFAULTS</h1>
<p>The defaults for the Options context-dependent and somewhat
complicated due to the goal of maintaining compatibility with legacy
loadup scripts. All of the following defaults rules hold independent of
the maikodir (-d) option.</p>
<ol type="1">
<li><p>If none of target, start, aux, and db are specified,
then:</p>
<p>1A. If neither thinw nor thinl are specified, the options default
to:</p>
<blockquote>
<p><strong>target full start 0 aux</strong></p>
</blockquote>
<p>1B. If either thinw or thinl are specified, no loadups are
run.</p></li>
<li><p>If neither start nor target are specified but either -aux or
-db or both are, then start defaults to <em>full</em> and target is
irrelevant.</p></li>
<li><p>If start is specified and target is not, then target defaults
to <em>full</em></p></li>
<li><p>If target is specified and start is not, then start defaults
to <em>0</em></p></li>
</ol>
<h1>EXAMPLES</h1>
<p><strong>./loadup -full -s lisp</strong> : run loadup thru Stage 4
(full.sysout) starting from existing Stage 3 outputs (lisp.sysout).</p>
<p><strong>./loadup --target full --start lisp</strong> : run loadup
thru Stage 4 (full.sysout) starting from existing Stage 3 outputs
(lisp.sysout).</p>
<p><strong>./loadup -5 aux</strong> : run loadup from the beginning
thru Stage 5 (apps.sysout) then run the Aux “stage” to create
<em>whereis.hash</em> and <em>exports.all</em></p>
<p><strong>./loadup -db</strong> : just run the DB “stage” starting from
an existing full.sysout; do not run any of the sequential stages.</p>
<p><strong>./loadup maikodir ~/il/newmaiko</strong> : run loadup
sequence from beginning to full plus the loadup Aux stage, while using
<em>~/il/newmaiko</em> as the location for the lde executables when
running Medley.</p>
<p><strong>./loadup -full</strong> : run loadup sequence from beginning
thru full</p>
<p><strong>./loadup -apps</strong> : run loadup sequence from beginning
thru app. Also run the Aux stage loadup.</p>
<p><strong>./loadup -apps-</strong> : run loadup sequence from beginning
thru app. Do not run the Aux stage loadup.</p>
<h1>BUGS</h1>
<p>See GitHub Issues:
&lt;https://github.com/Interlisp/medley/issues&gt;</p>
<h1>COPYRIGHT</h1>
<p>Copyright(c) 2025 by Interlisp.org</p>