1
0
mirror of synced 2026-04-04 21:47:27 +00:00

Compare commits

...

18 Commits

Author SHA1 Message Date
Frank Halasz
330c5a01a7 Some polish on the new loadup scripts - dribble files and lock overrides (#2157)
Three changes to loadup scripts:

1) dribble files are now copied from the workdir into loadups if loadup completes successfully, 

2) if the lock preventing simultaneous runs is already set when loadup starts, it now asks the user if they want to override the lock or to exit (previously it just exited), 

3) there is now a --override flag that will automatically override the lock without asking the user.  

Man page updated accordingly.
2025-05-19 09:48:39 -07:00
Frank Halasz
2499b3546e Fix Issue#2151 MEDLEY-INIT-VARS now resets the LI pseudohost whenever it resets the value of LOGINHOST/DIR (#2152)
Fix Issue#2151 

MEDLEY-INIT-VARS now resets the LI pseudohost whenever it sets/resets the value of LOGINHOST/DIR - providing PSEUDOHOSTS is loaded and LI pseudohost already exists.
2025-05-19 09:46:07 -07:00
rmkaplan
7ad65469b1 GITFNS gwc looks at all subdirectories, like prc (#2131)
Co-authored-by: Matt Heffron <heffron@alumni.caltech.edu>
2025-05-14 10:11:29 -07:00
rmkaplan
9feba7f7c7 JSON-GET indexes arrays with integer attributes (#2140) 2025-05-12 12:15:47 -07:00
Matt Heffron
c1c2c757b9 POSTSCRIPTSTREAM: Enable color names and RGB triples (#2127)
* I put in support for standard color specifications. I think this is pretty close.
BLTSHADE, FILLCIRCLE, and FILLPOLYGON with the TEXTURE as TEXTUREP or BITMAPP convert to a gray scale as a function of the number of bits set.
It'll take a bunch more refreshing of PostScript knowledge to figure out how to do these with real colors, and actual pixel-by-pixel textures.
2025-05-09 22:31:11 -07:00
Matt Heffron
0f8959a074 Fix error in lsee RegEx to replace ^ with ↑ (#2138) 2025-05-07 07:59:46 -07:00
Matt Heffron
30872f62e7 READ-BDF Fix incorrect detection of Italic font slope from BDF font metadata. (#2132)
Fix incorrect detection of Italic font slope from BDF font metadata.
2025-05-01 06:45:29 -07:00
rmkaplan
40e3edc291 Remove DIRECTORYNAMEP check in EDITCALLERS (#2123)
So that (EDITCALLERS 'xxx 'UNICODE) works
2025-04-28 17:49:43 -07:00
Larry Masinter
6c025089c1 Rmk87 minor updates EXAMINEDEFS, REGIONMANAGER, and TEDIT-PF-SEE (#2113)
* EXAMINEDEFS uses the Tedit atom-bound table for word selection
* REGIONMANAGER gives client better control over region recovered 
* TEDIT-PF-SEE: Meta-T defaults to showing the definition in the curren… 
* REGIONMANAGER and GITFNS documentation update
2025-04-28 13:09:30 -07:00
Frank Halasz
f53da7518f Fix Issue #1848: Medley script (and hence loadup script) now checks for lde (ldeinit) on PATH (#2129)
In medley script(s), when executing maiko (lde or ldeinit) check if its on the PATH before looking for it in MEDLEYDIR/maiko or MEDLEYDIR/../maiko.
2025-04-28 13:02:16 -07:00
Matt Heffron
39ebd40da4 READ-BDF: Handle newly encountered cases in BDF files. (#2108)
* Better handling of a glyph with ENCODING of -1. 
I treat it as the _slug_ glyph, instead of the _default_ of a solid block.

* Handle scrambled bitmaps issue #2109.
Glyphs with zero width bitmap *and* zero advance (_escapement_) caused miscalculated glyph offsets into the CHARSETINFO bitmap.

* Allow and ignore COMMENT lines preceding the STARTFONT line.
Add error checking for extracting font FAMILY, SIZE, FACE, etc. from the BDF-FONT object.
Add recommendation to documentation to write the DISPLAYFONT files to a directory separate from the system's IL:DISPLAYFONTDIRECTORIES locations.

* Account for glyphs with a negative initial offset.

* Add VERBOSE optional parameter to READ-BDF to report font internal FAMILY, FACE, etc.
Change &OPTIONAL parameters of WRITE-BDF-TO-DISPLAYFONT-FILES to &KEY to simplify calling. (No need to remember the order.)
Add CHAR-SETS and WRITE-UNMAPPED parameters to WRITE-BDF-TO-DISPLAYFONT-FILES to allow some level of control of which DISPLAYFONT files are written.
Updated documentation, and added warning note about font's FAMILY containing any digits.
2025-04-28 11:40:08 -07:00
Larry Masinter
ddbc8633eb LOADUPFULLFONTS: don't choke on extra index.html files in postscript font directory (#2117)
Co-authored-by: Frank Halasz <frank@halasz.org>
2025-04-26 17:30:43 -07:00
Frank Halasz
a4b9099b80 Extensive loadup scripts revamp (#2111)
This PR is an extensive revamp of the loadup scripts including the following changes:

New omnibus script scripts/loadup which is meant to be the single interface to the loadup system. The man page for this script can be found here: https://online.interlisp.org/downloads/man_loadup.html

The new loadup script allows you to restart the loadup process from any particular stage - init, mid, lisp, full, etc. For example, you can start the loadup from an existing init-mid.sysout and have it run thru creating the full.sysout. The call for this would be: ./scripts/loadup --target full --start mid. (See man page for all options to the loadup script as well as examples of their use.)

In order to facilitate this target/start feature, the loadup workdir has been moved to a single location per MEDLEYDIR, specifically to MEDLEDIR/loadups/build. (Previously, it was different for every invocation in /tmp/loadups-$$)

When restarting the loadup from, say, lisp.sysout, the script will look for the lisp.sysout to start from first in MEDLEYDIR/loadups and then in MEDLEYDIR/loadups/build. If the starting sysout is found in loadups, it will be copied (non-versioned) into the workdir before doing the loadup, overwriting whatever is already there.

There is now a lock (MEDLEYDIR/loadups/build/lock) that prevents concurrent loadups from running (and very occassionally needs to be manually removed).

At successful completion of a loadup run, the created .sysouts and other files are moved into the loadups directory as before (unless the --nocopy option is specified). BUT the build files - including the dribble files - are left in the working directory (i.e., in loadups/build)

The loadup script now supersedes the former loadup-all.sh, loadup-full.sh and loadup-db.sh scripts. But I have left in their place scripts that call the new loadup script with the right options. loadup-all.sh is now just a link to the single loadup script, who's options are (hopefully) a superset of loadup-all.sh.

All of the worker scripts (e.g., loadup-full-from-lisp.sh) have been updated to use better mechanisms to catch and report errors, including the new (LOGOUT T EXITCODE) feature. The main script has been updated to better catch errors in these worker scripts when they do happen.

You can now specify a MAIKODIR for the loadup, either using the MAIKODIR env variable or thru the --maikodir command line option.

All of the loadup scripts have been moved down one level into scripts/loadups. But there are links from the scripts/ directory into the scripts/loadups directory for all of the top-level legacy scripts - loadup-all.sh, loadup-db.sh, loadup-full.sh so that you do not have to change your own scripts unless you need to use some of the new features. More importantly, none of the github workflows need to change right now.

The SYSOUTCOMMITS mechanism had to be changed since there is no guarantee that e.g., lisp.sysout and full.sysout are built on the same commit. So (ASSOC 'MEDLEY SYSOUTCOMMITS) now returns an assoc list of sysouts, e.g., ((INIT "aaa")(LISP "bbb")(FULL "ccc")(APPS "ddd")), showing the commits for the various layers of the loadup.

The new loadup scheme allows different sysouts to be created from different commits, so there is an issue with RDSYS (and RDSYS.LCOM) being out of sync with one or more of the sysout in loadups. RDSYS(.LCOM) are copied into library when ever a loadup of the Init stage completes successfully (unless the -nocopy option is specified). The only way to solve this issue when it arises is to do a complete loadup from starter.sysout to full.sysout (or apps.sysout) to ensure evrything is built on the same commit.
2025-04-26 16:24:04 -07:00
rmkaplan
f4b7e91a68 lispusers/COMMENTHACKS had a bogus 255 byte at end after STOP 2025-04-26 13:31:16 -07:00
rmkaplan
46fe81bf36 REGIONMANAGER and GITFNS documentation update
GITFNS is just formatting, REGIONMANAGER documents the new SAVED-TYPED-REGION feature
2025-04-20 23:05:54 -07:00
rmkaplan
67a3e558f6 TEDIT-PF-SEE: Meta-T defaults to showing the definition in the current file 2025-04-20 22:52:06 -07:00
rmkaplan
37195dc7d9 REGIONMANAGER gives client better control over region recovered at closing
The client can decide that some reshapings don't matter (e.g. Tedit window splits) when recovering the typed region for later reuse
2025-04-20 22:50:51 -07:00
rmkaplan
fe033efe22 EXAMINEDEFS uses the Tedit atom-bound table for word selection 2025-04-20 22:49:05 -07:00
68 changed files with 4227 additions and 2210 deletions

1
.gitignore vendored
View File

@@ -30,6 +30,7 @@ loadups/*.dribble
loadups/whereis.hash
loadups/apps.sysout
loadups/fuller.database
loadups/build/
# manual cross-reference files

View File

@@ -1,43 +1,86 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "17-Jan-2023 20:34:02" {DSK}<home>frank>il>medley>gmedley>sources>LOADUP-APPS.;3 2095
(FILECREATED " 9-Mar-2025 20:03:27" {DSK}<home>frank>il>medley>internal>loadups>LOADUP-APPS.;10 3274
:CHANGES-TO (FNS Apps.RemoveBackgroundMenuItem)
:EDIT-BY "frank"
:PREVIOUS-DATE "17-Jan-2023 20:29:39" {DSK}<home>frank>il>medley>gmedley>sources>LOADUP-APPS.;2
:CHANGES-TO (FNS LOADUP-APPS)
:PREVIOUS-DATE " 9-Mar-2025 19:42:36" {DSK}<home>frank>il>medley>internal>loadups>LOADUP-APPS.;8
)
(PRETTYCOMPRINT LOADUP-APPSCOMS)
(RPAQQ LOADUP-APPSCOMS ((GLOBALVARS *ALL-BUTTONS* BackgroundMenuCommands BackgroundMenu)
(FNS Apps.LOADUP Apps.RemoveBackgroundMenuItem)))
(FNS LOADUP-APPS Apps.RemoveBackgroundMenuItem)))
(DECLARE%: DOEVAL@COMPILE DONTCOPY
(GLOBALVARS *ALL-BUTTONS* BackgroundMenuCommands BackgroundMenu)
)
(DEFINEQ
(Apps.LOADUP
[LAMBDA NIL (* ; "Edited 12-Nov-2022 14:03 by FGH")
(PROGN
(* ;; " Delete button(s) that are created when lispusers/BUTTONS is loaded")
(LOADUP-APPS
[LAMBDA NIL (* ; "Edited 9-Mar-2025 20:02 by frank")
(* ; "Edited 2-Jan-2025 20:38 by lmm")
(* ; "Edited 2-Jan-2025 06:30 by larry")
(for B in *ALL-BUTTONS* do (DELETE-BUTTON B))
(* ;; "= = = = = = = = = = = = = = = = = =")
(* ;; " Remove the BUTTONS BackgroundMenu item")
(* ;; " Load ROOMS")
(Apps.RemoveBackgroundMenuItem "Button Control")
(* ;; "")
(* ;; " Remove the NoteCards Background Menu Item")
(DOFILESLOAD `((SYSLOAD SOURCE)
(FROM ,(MEDLEYDIR "ROOMS"))
ROOMS))
(Apps.RemoveBackgroundMenuItem 'NoteCards)
(* ;; "======================")
(* ;; " Remove the CLOS Background Menu Item")
(* ;; " Load Notecards and %"fix up%"")
(Apps.RemoveBackgroundMenuItem 'BrowseClass)
(RPLACA [CAR (LIST '(A B C]
NIL])
(* ;; "")
(DOFILESLOAD `((SYSLOAD)
(FROM ,(CONCAT (UNIX-GETENV "NOTECARDSDIR")
"/system"))
NOTECARDS))
(Apps.RemoveBackgroundMenuItem 'NoteCards) (* ; "")
(PUTASSOC 'NOTECARDS (LIST (UNIX-GETENV 'NOTECARDS_COMMIT_ID))
SYSOUTCOMMITS)
(* ;; "======================")
(* ;; " Load CLOS and %"fix up%"")
(* ;; " Assumes that clos/DEFSYS.DFASL has already been loaded (so CLOS: package is defined)")
(* ;; "")
(LOADUP-CLOS)
(CLOS::LOAD-CLOS) (* ; "")
(Apps.RemoveBackgroundMenuItem 'BrowseClass)
(* ;; "= = = = = = = = = = = = = == = = = ")
(* ;; " Load lispusers/BUTTONS and %"fix up%"")
(* ;; "")
(DOFILESLOAD '((SYSLOAD)
BUTTONS))
(Apps.RemoveBackgroundMenuItem "Button Control")
(for B in *ALL-BUTTONS* do (DELETE-BUTTON B))
(* ;; "= = = = = = = = = = = = = == = = = ")
(* ;; " Do misc")
(* ;; "")
(PUTASSOC 'MEDLEY (LIST (UNIX-GETENV 'LOADUP_COMMIT_ID))
SYSOUTCOMMITS)
(PRINTOUT T "commits-- " SYSOUTCOMMITS T])
(Apps.RemoveBackgroundMenuItem
[LAMBDA (ItemStringOrAtom)
@@ -52,5 +95,5 @@
Apps.SBG])
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (647 2072 (Apps.LOADUP 657 . 1400) (Apps.RemoveBackgroundMenuItem 1402 . 2070)))))
(FILEMAP (NIL (656 3251 (LOADUP-APPS 666 . 2579) (Apps.RemoveBackgroundMenuItem 2581 . 3249)))))
STOP

Binary file not shown.

View File

@@ -0,0 +1,23 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED " 9-Mar-2025 19:04:34" {DSK}<home>frank>il>medley>internal>loadups>LOADUP-CLOS.;1 600
:EDIT-BY "frank"
:CHANGES-TO (VARS LOADUP-CLOSCOMS))
(PRETTYCOMPRINT LOADUP-CLOSCOMS)
(RPAQQ LOADUP-CLOSCOMS ((FNS LOADUP-CLOS)))
(DEFINEQ
(LOADUP-CLOS
[LAMBDA NIL (* ; "Edited 9-Mar-2025 18:53 by frank")
(DOFILESLOAD `((SYSLOAD)
(FROM ,(MEDLEYDIR "CLOS"))
DEFSYS])
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (333 577 (LOADUP-CLOS 343 . 575)))))
STOP

Binary file not shown.

View File

@@ -1,10 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "31-Jul-2023 18:28:53" {DSK}<home>frank>il>medley>gmedley>sources>LOADUP-FULL.;4 4521
(FILECREATED "23-Apr-2025 05:14:27" {DSK}<home>larry>il>medley>internal>loadups>LOADUP-FULL.;2 4662
:CHANGES-TO (FNS LOADUP-FULL)
:EDIT-BY "lmm"
:PREVIOUS-DATE "18-Jan-2023 16:23:36" {DSK}<home>frank>il>medley>gmedley>sources>LOADUP-FULL.;3
:CHANGES-TO (FNS LOADFULLFONTS)
:PREVIOUS-DATE "31-Jul-2023 18:28:53" {DSK}<home>larry>il>medley>internal>loadups>LOADUP-FULL.;1
)
@@ -15,7 +17,8 @@
(DEFINEQ
(LOADFULLFONTS
[LAMBDA NIL (* ; "Edited 13-Feb-2021 22:51 by larry")
[LAMBDA NIL (* ; "Edited 23-Apr-2025 05:13 by lmm")
(* ; "Edited 13-Feb-2021 22:51 by larry")
(* ;; " Don't do Interpress. Do character set 0 and the symbol character sets 41Q, 42Q, 356Q, 357Q and extended and accented Latin 43Q and 361Q")
@@ -35,7 +38,7 @@
(PRINTOUT T T))
(PRINTOUT T " Loading postscript fonts" T)
(for F in (FILDIR (CONCAT (CAR POSTSCRIPTFONTDIRECTORIES)
">c0>*.*")) do (PSCFONT.READFONT F))
">c0>*.PSCFONT")) do (PSCFONT.READFONT F))
(PRINTOUT T "FULL fonts loaded" T])
(LOADUP-FULL
@@ -86,5 +89,5 @@
(FIXMETA)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (467 4483 (LOADFULLFONTS 477 . 1918) (LOADUP-FULL 1920 . 4233) (FIXMETA 4235 . 4481)))))
(FILEMAP (NIL (493 4624 (LOADFULLFONTS 503 . 2059) (LOADUP-FULL 2061 . 4374) (FIXMETA 4376 . 4622)))))
STOP

Binary file not shown.

View File

@@ -0,0 +1,351 @@
.\" Automatically generated by Pandoc 3.1.3
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.ad l
.TH "loadup" "1" "" "" "Run the Medley loadup procedure"
.nh
.SH NAME
.PP
\f[B]loadup\f[R] \[em] runs a loadup procedure for Medley Interlisp
.SH SYNOPSIS
.PP
\f[B]<MEDLEYDIR>/scripts/loadup\f[R] [ options \&...
]
.SH DESCRIPTION
.PP
Runs all or part of the \f[B]loadup\f[R] 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.
.PP
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).
.PP
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 (<MEDLEYDIR>/loadups).
The \f[I]medley\f[R] run script and other Medley tools look for these
files in the loadups directory.
.PP
The 5 sequential stages and their main products are:
.RS
.IP "1." 3
\f[B]Init:\f[R] create an \f[I]init.dlinit\f[R] sysout file.
This init.dlinit file is used internally for Stage 2 and is not copied
into the loadups directory.
.RE
.RS
.IP "2." 3
\f[B]Mid:\f[R] create an \f[I]init-mid.sysout\f[R].
This init-mid.sysout is used only internally for Stage 3 and is not
copied into the loadups directory.
.RE
.RS
.IP "3." 3
\f[B]Lisp:\f[R] create \f[I]lisp.sysout\f[R].
Lisp.sysout has a minimal set of Medley\[cq]s functionality loaded and
can be used as the basis for running a stripped-down Medley session.
Lisp.sysout is copied into the loadups directory.
.RE
.RS
.IP "4." 3
\f[B]Full:\f[R] create \f[I]full.sysout\f[R].
Full.sysout has all of the \[lq]standard\[rq] set of Medley
functionality loaded and is the primary sysout used for running Medley
sessions.
Full.sysout is copied into the loadups directory.
.RE
.RS
.IP "5." 3
\f[B]Apps:\f[R]: create \f[I]apps.sysout\f[R].
Apps.sysout includes everything in full.sysout plus the Medley
applications Buttons, CLOS, Rooms, and Notecards.
.RE
.PP
The two independent stages that can be run if the first 4 sequential
stages complete successfully are:
.RS
.IP \[bu] 2
\f[B]Aux:\f[R]: create the \f[I]whereis.hash\f[R] and
\f[I]exports.all\f[R] files.
These are databases that are commonly used when working on Medley source
code.
They are copied into the loadups directory.
.IP \[bu] 2
\f[B]DB:\f[R]: creates the \f[I]fuller.database\f[R] 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.
.RE
.PP
Loadup does all of its work in a work directory
(<MEDLEYDIR>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.
.PP
Only one instance (per <MEDLEIDIR>) of loadup can be run at a time.
There is lock file to prevent simultaneous loadups in the work directory
(named \f[B]\f[BI]lock\f[B]\f[R]) that can be manually removed.
The lock can also be automatically overridden (see the \[en]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.
.PP
Note: \f[B]MEDLEYDIR\f[R] 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.
.SH OPTIONS
.TP
\f[B]-z, --man, -man\f[R]
Print this manual page on the screen.
.TP
\f[B]-t STAGE, --target STAGE, -target STAGE\f[R]
Run the sequential loadup procedure until the STAGE is complete,
starting from the files created by the previously run STAGE specified in
the \[en]start option.
.RS
.PP
STAGE can be one of the following:
.RE
.RS
.RS
.PP
i, init, 1: Run the loadup sequence through Stage 1 (init.dlinit).
Init.dlinit is \f[I]not\f[R] copied into the loadups directory.
.RE
.RE
.RS
.RS
.PP
m, mid, 2: Run the loadup sequence through Stage 2 (init-mid.sysout).
Init-mid.sysout is \f[I]not\f[R] copied into the loadups directory.
.RE
.RE
.RS
.RS
.PP
l, lisp, 3: Run the loadup sequence through Stage 3 (lisp.sysout).
Lisp.sysout is copied into the loadups directory.
.RE
.RE
.RS
.RS
.PP
f, full, 4: Run the loadup sequence through Stage 4 (full.sysout).
Full.sysout is copied into the loadups directory.
.RE
.RE
.RS
.RS
.PP
a, apps, 5: Run the loadup sequence through Stage 5 (apps.sysout).
Also run the Aux stage as if \[en]aux option had been specified.
Apps.sysout and the Aux files are copied into the loadups directory.
.RE
.RE
.RS
.RS
.PP
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 \[en]aux option had been specified.
.RE
.RE
.TP
\f[B]-s STAGE --start STAGE, -start STAGE\f[R]
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.
.RS
.PP
STAGE can be one of the following:
.RE
.RS
.RS
.PP
s, scratch, 0 : Start the loadup process from the beginning.
This is the default.
.RE
.RE
.RS
.RS
.PP
i, init, 1 : Start the loadup process using the files created by Stage 1
(init.dlinit).
.RE
.RE
.RS
.RS
.PP
m, mid, 2 : Start the loadup process using the files created by Stage 2
(init-mid.sysout).
.RE
.RE
.RS
.RS
.PP
l, lisp, 3 : Start the loadup process using the files created by Stage 3
(lisp.sysout)
.RE
.RE
.RS
.RS
.PP
f, full, 4 : Start the loadup process using the files created by Stage 4
(full.sysout).
.RE
.RE
.TP
\f[B]-x, --aux, -aux\f[R]
Run the Aux loadup stage, creating the \f[I]whereis.hash\f[R] and
\f[I]exports.all\f[R] files.
If loadup completes successfully, these files are copied into loadups.
.TP
\f[B]-b, --db, -db\f[R]
Run the DB loadup stage, creating the \f[I]fuller.database\f[R] file.
If this stage complete successfully, these files are copied into
loadups.
.TP
\f[B]-i, --init, -init, -1\f[R]
Synonym for \[lq]\[en]target init\[rq]
.TP
\f[B]-m, --mid, -mid, -2\f[R]
Synonym for \[lq]\[en]target mid\[rq]
.TP
\f[B]-l, --lisp, -lisp, -3\f[R]
Synonym for \[lq]\[en]target lisp\[rq]
.TP
\f[B]-f, --full. -full, -4\f[R]
Synonym for \[lq]\[en]target full\[rq]
.TP
\f[B]-a, --apps, -apps, -5\f[R]
Synonym for \[lq]\[en]target apps\[rq]
.TP
\f[B]-a-, --apps-, -apps-, -5-\f[R]
Synonym for \[lq]\[en]target apps\[rq]
.TP
\f[B]-ov, --override, -override\f[R]
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.
.TP
\f[B]-nc, --nocopy, -nocopy\f[R]
Run the specified loadups, but do not copy results into loadups
directory.
.TP
\f[B]-tw, --thinw, -thinw\f[R]
Before running loadups (if any), thin the working directory by deleting
all versioned (\f[I].\[ti][0-9]\f[R]\[ti]) files.
.TP
\f[B]-tl, --thinl, -thinl\f[R]
Before running loadups (if any), thin the loadups directory by deleting
all versioned (\f[I].\[ti][0-9]\f[R]\[ti]) files.
.TP
\f[B]-d DIR --maikodir DIR, -maikodir DIR\f[R]
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.
.SH DEFAULTS
.PP
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
\[en]maikodir (-d) option.
.IP "1." 3
If none of \[en]target, \[en]start, \[en]aux, and \[en]db are specified,
then:
.RS
.PP
1A.
If neither \[en]thinw nor \[en]thinl are specified, the options default
to:
.RE
.RS
.RS
.PP
\f[B]\[en]target full \[en]start 0 \[en]aux\f[R]
.RE
.RE
.RS
.PP
1B.
If either \[en]thinw or \[en]thinl are specified, no loadups are run.
.RE
.IP "2." 3
If neither \[en]start nor \[en]target are specified but either -aux or
-db or both are, then \[en]start defaults to \f[I]full\f[R] and
\[en]target is irrelevant.
.IP "3." 3
If \[en]start is specified and \[en]target is not, then \[en]target
defaults to \f[I]full\f[R]
.IP "4." 3
If \[en]target is specified and \[en]start is not, then \[en]start
defaults to \f[I]0\f[R]
.SH EXAMPLES
.PP
\f[B]./loadup -full -s lisp\f[R] : run loadup thru Stage 4 (full.sysout)
starting from existing Stage 3 outputs (lisp.sysout).
.PP
\f[B]./loadup --target full --start lisp\f[R] : run loadup thru Stage 4
(full.sysout) starting from existing Stage 3 outputs (lisp.sysout).
.PP
\f[B]./loadup -5 \[en]aux\f[R] : run loadup from the beginning thru
Stage 5 (apps.sysout) then run the Aux \[lq]stage\[rq] to create
\f[I]whereis.hash\f[R] and \f[I]exports.all\f[R]
.PP
\f[B]./loadup -db\f[R] : just run the DB \[lq]stage\[rq] starting from
an existing full.sysout; do not run any of the sequential stages.
.PP
\f[B]./loadup \[en]maikodir \[ti]/il/newmaiko\f[R] : run loadup sequence
from beginning to full plus the loadup Aux stage, while using
\f[I]\[ti]/il/newmaiko\f[R] as the location for the lde executables when
running Medley.
.PP
\f[B]./loadup -full\f[R] : run loadup sequence from beginning thru full
.PP
\f[B]./loadup -apps\f[R] : run loadup sequence from beginning thru app.
Also run the Aux stage loadup.
.PP
\f[B]./loadup -apps-\f[R] : run loadup sequence from beginning thru app.
Do not run the Aux stage loadup.
.SH BUGS
.PP
See GitHub Issues: <https://github.com/Interlisp/medley/issues>
.SH COPYRIGHT
.PP
Copyright(c) 2025 by Interlisp.org

Binary file not shown.

View File

@@ -0,0 +1,182 @@
% loadup(1) | Run the Medley loadup procedure
---
adjusting: l
hyphenate: false
---
NAME
====
**loadup** — runs a loadup procedure for Medley Interlisp
SYNOPSIS
========
**\<MEDLEYDIR>/scripts/loadup** \[ options ... ]
DESCRIPTION
===========
Runs all or part of the **loadup** 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.
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).
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 (\<MEDLEYDIR>/loadups).
The *medley* run script and other Medley tools look for these files in the loadups directory.
The 5 sequential stages and their main products are:
>1. **Init:** create an *init.dlinit* sysout file. This init.dlinit file is used internally for Stage 2 and is not copied into the loadups directory.
>2. **Mid:** create an *init-mid.sysout*. This init-mid.sysout is used only internally for Stage 3 and is not copied into the loadups directory.
>3. **Lisp:** create *lisp.sysout*. Lisp.sysout has a minimal set of Medley's functionality loaded and can be used as the basis for running a stripped-down Medley session. Lisp.sysout is copied into the loadups directory.
>4. **Full:** create *full.sysout*. 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.
>5. **Apps:**: create *apps.sysout*. Apps.sysout includes everything in full.sysout plus the Medley applications Buttons, CLOS, Rooms, and Notecards.
The two independent stages that can be run if the first 4 sequential stages complete successfully are:
>+ **Aux:**: create the *whereis.hash* and *exports.all* files. These are databases that are commonly used when working on Medley source code. They are copied into the loadups directory.
>+ **DB:**: creates the *fuller.database* 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.
Loadup does all of its work in a work directory (\<MEDLEYDIR>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.
Only one instance (per \<MEDLEIDIR>) of loadup can be run at a time. There is lock file to prevent simultaneous loadups in the work directory (named ***lock***) 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.
Note: **MEDLEYDIR** 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.
OPTIONS
=======
**-z, \-\-man, \-man**
: Print this manual page on the screen.
**-t STAGE, \-\-target STAGE, -target STAGE**
: 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.
>STAGE can be one of the following:
>>i, init, 1: Run the loadup sequence through Stage 1 (init.dlinit). Init.dlinit is *not* copied into the loadups directory.
>>m, mid, 2: Run the loadup sequence through Stage 2 (init-mid.sysout). Init-mid.sysout is *not* copied into the loadups directory.
>>l, lisp, 3: Run the loadup sequence through Stage 3 (lisp.sysout). Lisp.sysout is copied into the loadups directory.
>>f, full, 4: Run the loadup sequence through Stage 4 (full.sysout). Full.sysout is copied into the loadups directory.
>>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.
>>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.
**-s STAGE \-\-start STAGE, -start STAGE**
: 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.
>STAGE can be one of the following:
>>s, scratch, 0 : Start the loadup process from the beginning. This is the default.
>> i, init, 1 : Start the loadup process using the files created by Stage 1 (init.dlinit).
>>m, mid, 2 : Start the loadup process using the files created by Stage 2 (init-mid.sysout).
>>l, lisp, 3 : Start the loadup process using the files created by Stage 3 (lisp.sysout)
>>f, full, 4 : Start the loadup process using the files created by Stage 4 (full.sysout).
**-x, \-\-aux, -aux**
: Run the Aux loadup stage, creating the *whereis.hash* and *exports.all* files. If loadup completes successfully, these files are copied into loadups.
**-b, \-\-db, \-db**
: Run the DB loadup stage, creating the *fuller.database* file. If this stage complete successfully, these files are copied into loadups.
**-i, \-\-init, -init, -1**
: Synonym for "--target init"
**-m, \-\-mid, -mid, -2**
: Synonym for "--target mid"
**-l, \-\-lisp, -lisp, -3**
: Synonym for "--target lisp"
**-f, \-\-full. -full, -4**
: Synonym for "--target full"
**-a, \-\-apps, -apps, -5**
: Synonym for "--target apps"
**-a-, \-\-apps-, -apps-, -5-**
: Synonym for "--target apps"
**-ov, \-\-override, -override**
: 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.
**-nc, \-\-nocopy, -nocopy**
: Run the specified loadups, but do not copy results into loadups directory.
**-tw, \-\-thinw, -thinw**
: Before running loadups (if any), thin the working directory by deleting all versioned (*.~[0-9]*~) files.
**-tl, \-\-thinl, -thinl**
: Before running loadups (if any), thin the loadups directory by deleting all versioned (*.~[0-9]*~) files.
**-d DIR \-\-maikodir DIR, -maikodir DIR**
: 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.
DEFAULTS
====
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.
1. If none of --target, --start, --aux, and --db are specified, then:
>1A. If neither --thinw nor --thinl are specified, the options default to:
>> **--target full --start 0 --aux**
>1B. If either --thinw or --thinl are specified, no loadups are run.
2. If neither --start nor --target are specified but either -aux or -db or both are, then --start defaults to *full* and --target is irrelevant.
3. If --start is specified and --target is not, then --target defaults to *full*
4. If --target is specified and --start is not, then --start defaults to *0*
EXAMPLES
====
**./loadup -full -s lisp** : run loadup thru Stage 4 (full.sysout) starting from existing Stage 3 outputs (lisp.sysout).
**./loadup \-\-target full \-\-start lisp** : run loadup thru Stage 4 (full.sysout) starting from existing Stage 3 outputs (lisp.sysout).
**./loadup -5 --aux** : run loadup from the beginning thru Stage 5 (apps.sysout) then run the Aux "stage" to create *whereis.hash* and *exports.all*
**./loadup -db** : just run the DB "stage" starting from an existing full.sysout; do not run any of the sequential stages.
**./loadup --maikodir ~/il/newmaiko** : run loadup sequence from beginning to full plus the loadup Aux stage, while using *~/il/newmaiko* as the location for the lde executables when running Medley.
**./loadup -full** : run loadup sequence from beginning thru full
**./loadup -apps** : run loadup sequence from beginning thru app. Also run the Aux stage loadup.
**./loadup -apps-** : run loadup sequence from beginning thru app. Do not run the Aux stage loadup.
BUGS
====
See GitHub Issues: <https://github.com/Interlisp/medley/issues>
COPYRIGHT
=========
Copyright(c) 2025 by Interlisp.org

View File

@@ -0,0 +1,2 @@
#!/bin/bash
pandoc --from man --to html < loadup.1 > man_loadup.html

View File

@@ -0,0 +1,279 @@
<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>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</strong></dt>
<dd>
<p>Print this manual page on the screen.</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>-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.</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.</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>
</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>

View File

@@ -0,0 +1,3 @@
#!/bin/bash
pandoc loadup.1.md -s -t man -o loadup.1
gzip --stdout loadup.1 >loadup.1.gz

View File

@@ -0,0 +1,4 @@
#!/bin/bash
./md2man.sh
./man2html.sh

View File

@@ -0,0 +1,2 @@
#!/bin/bash
pandoc loadup.1.md -s -t man | /usr/bin/man -l -

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -281,4 +281,3 @@ Copyright (c) 1987 by Unisys Corp.. All rights reserved.
(FILEMAP (NIL (1135 12019 (EDITDEF.FUNCTIONS 1145 . 1784) (FIXDEFUNEDITDATE 1786 . 3426) (MYEDITDATE?
3428 . 4692) (MYSUPERPRINT/COMMENT 4694 . 7753) (MYSUPERPRINT/COMMENT2 7755 . 12017)))))
STOP
ÿ

View File

@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "31-Mar-2025 13:53:38" {WMEDLEY}<lispusers>EXAMINEDEFS.;56 16674
(FILECREATED " 6-Apr-2025 23:54:50" {WMEDLEY}<lispusers>EXAMINEDEFS.;57 16827
:EDIT-BY rmk
:CHANGES-TO (FNS EXAMINEDEFS)
:CHANGES-TO (FNS TEDITDEF)
:PREVIOUS-DATE "18-Feb-2025 23:01:57" {WMEDLEY}<lispusers>EXAMINEDEFS.;55)
:PREVIOUS-DATE "31-Mar-2025 13:53:38" {WMEDLEY}<lispusers>EXAMINEDEFS.;56)
(PRETTYCOMPRINT EXAMINEDEFSCOMS)
@@ -198,11 +198,12 @@
NIL TITLE2])
(TEDITDEF
[LAMBDA (NAME DEF TYPE READERENVIRONMENT WIDTH) (* ; "Edited 13-Oct-2023 00:23 by rmk")
[LAMBDA (NAME DEF TYPE READERENVIRONMENT WIDTH) (* ; "Edited 6-Apr-2025 23:53 by rmk")
(* ; "Edited 13-Oct-2023 00:23 by rmk")
(* ; "Edited 23-Jun-2022 17:27 by rmk")
(* ; "Edited 28-Jan-2022 23:36 by rmk")
(* ; "Edited 12-Jan-2022 17:27 by rmk")
(LET ((TSTREAM (OPENTEXTSTREAM)))
(LET [(TSTREAM (OPENTEXTSTREAM NIL NIL `(BOUNDTABLE ,(TEDIT.ATOMBOUND.READTABLE]
(DSPFONT DEFAULTFONT TSTREAM)
(CL:WHEN WIDTH
(LINELENGTH (IQUOTIENT WIDTH (CHARWIDTH (CHARCODE SPACE)
@@ -280,6 +281,6 @@
(FILESLOAD (SYSLOAD)
COMPARETEXT VERSIONDEFS)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (665 16443 (EXAMINEDEFS 675 . 10997) (EXAMINEFILES 10999 . 12481) (TEDITDEF 12483 .
14649) (EXVV 14651 . 16441)))))
(FILEMAP (NIL (662 16596 (EXAMINEDEFS 672 . 10994) (EXAMINEFILES 10996 . 12478) (TEDITDEF 12480 .
14802) (EXVV 14804 . 16594)))))
STOP

Binary file not shown.

View File

@@ -1,28 +1,29 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "31-Mar-2025 21:25:00" {WMEDLEY}<lispusers>GITFNS.;539 133841
(FILECREATED "29-Apr-2025 15:17:37" {WMEDLEY}<lispusers>GITFNS.;541 134267
:EDIT-BY rmk
:CHANGES-TO (FNS GIT-GET-FILE GIT-RESULT-TO-LINES)
:CHANGES-TO (VARS GITFNSCOMS)
(FNS GIT-WORKING-COMPARE-DIRECTORIES)
:PREVIOUS-DATE "21-Mar-2025 19:07:34" {WMEDLEY}<lispusers>GITFNS.;536)
:PREVIOUS-DATE "31-Mar-2025 21:25:00" {WMEDLEY}<lispusers>GITFNS.;539)
(PRETTYCOMPRINT GITFNSCOMS)
(RPAQQ GITFNSCOMS
(RPAQQ GITFNSCOMS
(
(* ;; "Set up")
(* ;; "Set up")
(FILES (SYSLOAD FROM LISPUSERS)
COMPAREDIRECTORIES COMPARESOURCES COMPARETEXT PSEUDOHOSTS JSON UNIXUTILS REGIONMANAGER
)
(* ;; "")
(* ;; "")
(* ;; "GIT projects")
(* ;; "GIT projects")
(COMS (FNS GIT-CLONEP GIT-INIT GIT-MAKE-PROJECT GIT-GET-PROJECT GIT-PUT-PROJECT-FIELD
GIT-PROJECT-PATH FIND-ANCESTOR-DIRECTORY GIT-FIND-CLONE GIT-MAINBRANCH
@@ -43,94 +44,94 @@
(P (GIT-INIT))
(ADDVARS (AROUNDEXITFNS GIT-INIT))
(* ;; "")
(* ;; "")
(* ;; "Lisp exec commands")
(* ;; "Lisp exec commands")
(INITVARS (GIT-MERGE-COMPARES T)
(GIT-CDBROWSER-SEPARATE-DIRECTIONS T))
(COMMANDS gwc bbc prc cob b? cdg cdw)
(FNS PRC-COMMAND)
(* ;; "")
(* ;; "")
(* ;; "File correspondents")
(* ;; "File correspondents")
(FNS ALLSUBDIRS MEDLEYSUBDIRS GITSUBDIRS)
(FNS TOGIT FROMGIT GIT-DELETE-FILE MYMEDLEY-DELETE-FILES)
(FNS MYMEDLEYSUBDIR GITSUBDIR STRIPDIR STRIPHOST STRIPNAME STRIPWHERE)
(FNS GFILE4MFILE MFILE4GFILE GIT-REPO-FILENAME)
(* ;; "")
(* ;; "")
(* ;; "Git commands")
(* ;; "Git commands")
(FNS GIT-COMMIT GIT-PUSH GIT-PULL GIT-APPROVAL GIT-GET-FILE GIT-FILE-EXISTS?
GIT-REMOTE-UPDATE GIT-REMOTE-ADD GIT-FILE-DATE GIT-FILE-HISTORY GIT-PRINT-FILE-HISTORY
GIT-FETCH)
(* ;; "Differences")
(* ;; "Differences")
(FNS GIT-BRANCH-DIFF GIT-COMMIT-DIFFS GIT-BRANCH-RELATIONS)
(* ;; "")
(* ;; "")
(* ;; "Branches")
(* ;; "Branches")
(FNS GIT-BRANCH-NUM GIT-CHECKOUT GIT-WHICH-BRANCH GIT-MAKE-BRANCH GIT-BRANCHES
GIT-BRANCH-EXISTS? GIT-PICK-BRANCH GIT-BRANCH-MENU GIT-BRANCH-WHENSELECTEDFN
GIT-PULL-REQUESTS GIT-SHORT-BRANCH-NAME GIT-LONG-NAME GIT-PRC-BRANCHES)
(* ;; "My branches")
(* ;; "My branches")
(FNS GIT-MY-CURRENT-BRANCH GIT-MY-BRANCHP GIT-MY-NEXT-BRANCH GIT-MY-BRANCHES)
(* ;; "")
(* ;; "")
(* ;; "Worktrees")
(* ;; "Worktrees")
(FNS GIT-ADD-WORKTREE GIT-REMOVE-WORKTREE GIT-LIST-WORKTREES WORKTREEDIR)
(* ;; "")
(* ;; "")
(* ;; "Comparisons")
(* ;; "Comparisons")
(FNS GIT-GET-DIFFERENT-FILES GIT-BRANCHES-COMPARE-DIRECTORIES GIT-WORKING-COMPARE-DIRECTORIES
GIT-COMPARE-WORKTREE GITCDOBJBUTTONFN GIT-CD-LABELFN GIT-CD-MENUFN
GIT-WORKING-COMPARE-FILES GIT-BRANCHES-COMPARE-FILES GIT-PR-COMPARE)
(INITVARS (FROMGITN 0))
(* ;; "")
(* ;; "")
(* ;; "Utilities")
(* ;; "Utilities")
(FNS CDGITDIR GIT-COMMAND GITORIGIN GIT-INITIALS GIT-COMMAND-TO-FILE GIT-RESULT-TO-LINES
STRIPLOCAL)
(PROPS (GITFNS FILETYPE))))
(PROPS (GITFNS FILETYPE))))
(* ;; "Set up")
(* ;; "Set up")
(FILESLOAD (SYSLOAD FROM LISPUSERS)
(FILESLOAD (SYSLOAD FROM LISPUSERS)
COMPAREDIRECTORIES COMPARESOURCES COMPARETEXT PSEUDOHOSTS JSON UNIXUTILS REGIONMANAGER)
(* ;; "")
(* ;; "")
(* ;; "GIT projects")
(* ;; "GIT projects")
(DEFINEQ
@@ -401,15 +402,15 @@
(DECLARE%: EVAL@COMPILE DONTCOPY
(DECLARE%: EVAL@COMPILE
(TYPERECORD GIT-PROJECT (PROJECTNAME GITHOST WHOST EXCLUSIONS DEFAULTSUBDIRS CLONEPATH MAINBRANCH))
(TYPERECORD GIT-PROJECT (PROJECTNAME GITHOST WHOST EXCLUSIONS DEFAULTSUBDIRS CLONEPATH MAINBRANCH))
(RECORD PULLREQUEST (PRNUMBER PRDESCRIPTION PRNAME PRSTATUS PRPROJECT PRURL PRLOGIN))
(RECORD PULLREQUEST (PRNUMBER PRDESCRIPTION PRNAME PRSTATUS PRPROJECT PRURL PRLOGIN))
)
)
(RPAQ? GIT-DEFAULT-PROJECT 'MEDLEY)
(RPAQ? GIT-DEFAULT-PROJECT 'MEDLEY)
(RPAQ? GIT-DEFAULT-PROJECTS
(RPAQ? GIT-DEFAULT-PROJECTS
'((MEDLEY NIL NIL (EXPORTS.ALL RDSYS RDSYS.LCOM loadups/ patches/ tmp/ fontsold/ clos/ cltl2/)
(greetfiles scripts sources library lispusers internal doctools rooms))
(NOTECARDS)
@@ -417,120 +418,120 @@
(TEST)
(MAIKO)))
(RPAQ? GIT-PROJECTS NIL)
(RPAQ? GIT-PROJECTS NIL)
(RPAQ? GIT-PRC-MENUS NIL)
(RPAQ? GIT-PRC-MENUS NIL)
(GIT-INIT)
(GIT-INIT)
(ADDTOVAR AROUNDEXITFNS GIT-INIT)
(ADDTOVAR AROUNDEXITFNS GIT-INIT)
(* ;; "")
(* ;; "")
(* ;; "Lisp exec commands")
(* ;; "Lisp exec commands")
(RPAQ? GIT-MERGE-COMPARES T)
(RPAQ? GIT-MERGE-COMPARES T)
(RPAQ? GIT-CDBROWSER-SEPARATE-DIRECTIONS T)
(RPAQ? GIT-CDBROWSER-SEPARATE-DIRECTIONS T)
(DEFCOMMAND gwc (SUBDIR . OTHERS)
(* ;; "Compares the specified local git-medley subdirectories against my working Medley. The SUBDIRS are the arguments up to one that looks like a project")
(* ;; "Compares the specified local git-medley subdirectories against my working Medley. The SUBDIRS are the arguments up to one that looks like a project")
(LET ((SUBDIRS (AND SUBDIR (CONS SUBDIR OTHERS)))
(LET ((SUBDIRS (AND SUBDIR (CONS SUBDIR OTHERS)))
PROJECT)
(SETQ SUBDIRS (FOR STAIL ON SUBDIRS COLLECT (IF (GIT-GET-PROJECT (CAR STAIL)
(SETQ SUBDIRS (FOR STAIL ON SUBDIRS COLLECT (IF (GIT-GET-PROJECT (CAR STAIL)
NIL T)
THEN (SETQ PROJECT (CAR STAIL))
(GO $$OUT))
(CAR STAIL)))
(GIT-WORKING-COMPARE-DIRECTORIES SUBDIRS NIL NIL NIL T PROJECT)))
THEN (SETQ PROJECT (CAR STAIL))
(GO $$OUT))
(CAR STAIL)))
(GIT-WORKING-COMPARE-DIRECTORIES SUBDIRS NIL NIL NIL T PROJECT)))
(DEFCOMMAND bbc (BRANCH1 BRANCH2 LOCAL PROJECT)
(* ;; "Compares 2 git branches. Defaults to local/ if LOCAL, otherwise defaults to origin/. BRANCH2 defaults to the main branch (origin/ or local/ depending on LOCAL)")
(* ;; "Compares 2 git branches. Defaults to local/ if LOCAL, otherwise defaults to origin/. BRANCH2 defaults to the main branch (origin/ or local/ depending on LOCAL)")
(SETQ PROJECT (GIT-GET-PROJECT PROJECT))
(GIT-FETCH PROJECT)
(SETQ BRANCH1 (SELECTQ (U-CASE BRANCH1)
(SETQ PROJECT (GIT-GET-PROJECT PROJECT))
(GIT-FETCH PROJECT)
(SETQ BRANCH1 (SELECTQ (U-CASE BRANCH1)
((NIL T)
(GIT-MY-CURRENT-BRANCH PROJECT))
(GIT-MY-CURRENT-BRANCH PROJECT))
((LOCAL REMOTE ORIGIN)
(GIT-PICK-BRANCH (GIT-BRANCHES BRANCH1 PROJECT T)))
(OR (GIT-LONG-NAME BRANCH1 NIL PROJECT)
(GIT-PICK-BRANCH (GIT-BRANCHES BRANCH1 PROJECT T)))
(OR (GIT-LONG-NAME BRANCH1 NIL PROJECT)
BRANCH1)))
(SETQ BRANCH2 (SELECTQ (U-CASE BRANCH2)
(SETQ BRANCH2 (SELECTQ (U-CASE BRANCH2)
((NIL T)
(GIT-MAINBRANCH PROJECT LOCAL))
(GIT-MAINBRANCH PROJECT LOCAL))
((LOCAL REMOTE ORIGIN)
(GIT-PICK-BRANCH (GIT-BRANCHES BRANCH2 PROJECT T)))
(OR (GIT-LONG-NAME BRANCH2 NIL PROJECT)
(GIT-PICK-BRANCH (GIT-BRANCHES BRANCH2 PROJECT T)))
(OR (GIT-LONG-NAME BRANCH2 NIL PROJECT)
BRANCH2)))
(GIT-BRANCHES-COMPARE-DIRECTORIES BRANCH1 (OR BRANCH2 (GIT-MAINBRANCH PROJECT LOCAL))
(GIT-BRANCHES-COMPARE-DIRECTORIES BRANCH1 (OR BRANCH2 (GIT-MAINBRANCH PROJECT LOCAL))
LOCAL PROJECT))
(DEFCOMMAND prc (REMOTEBRANCH DRAFTS PROJECT)
(* ;; "Compares REMOTEBRANCH against the main orign branch, for pull-request assessment")
(* ;; "Compares REMOTEBRANCH against the main orign branch, for pull-request assessment")
(PRC-COMMAND REMOTEBRANCH DRAFTS PROJECT))
(PRC-COMMAND REMOTEBRANCH DRAFTS PROJECT))
(DEFCOMMAND cob (BRANCH NEXTTITLESTRING PROJECT)
(* ;; "Switches to BRANCH. T means my current branch, NEW/NEXT means my next branch (under wherever we are now), and NEXTTITLESTRING if given will be attached to the branch-name. Default is to bring up a menu of locally available branches.")
(* ;; "Switches to BRANCH. T means my current branch, NEW/NEXT means my next branch (under wherever we are now), and NEXTTITLESTRING if given will be attached to the branch-name. Default is to bring up a menu of locally available branches.")
(CL:UNLESS (STRINGP NEXTTITLESTRING)
(SETQ PROJECT NEXTTITLESTRING))
(CL:UNLESS (STRINGP NEXTTITLESTRING)
(SETQ PROJECT NEXTTITLESTRING))
(CL:UNLESS PROJECT
(CL:WHEN (GIT-GET-PROJECT BRANCH NIL T)
(SETQ PROJECT BRANCH)
(SETQ BRANCH NIL)))
(SETQ PROJECT (GIT-GET-PROJECT PROJECT))
(GIT-FETCH PROJECT)
(SELECTQ (U-CASE BRANCH)
(T (GIT-CHECKOUT (GIT-MY-CURRENT-BRANCH PROJECT)
(CL:WHEN (GIT-GET-PROJECT BRANCH NIL T)
(SETQ PROJECT BRANCH)
(SETQ BRANCH NIL)))
(SETQ PROJECT (GIT-GET-PROJECT PROJECT))
(GIT-FETCH PROJECT)
(SELECTQ (U-CASE BRANCH)
(T (GIT-CHECKOUT (GIT-MY-CURRENT-BRANCH PROJECT)
PROJECT))
((NEW NEXT)
(GIT-MAKE-BRANCH NIL NEXTTITLESTRING PROJECT))
(CL:WHEN [SETQ BRANCH (IF BRANCH
THEN (GIT-LONG-NAME BRANCH NIL PROJECT)
ELSE (GIT-PICK-BRANCH (GIT-BRANCHES 'LOCAL PROJECT T)
(CONCAT (L-CASE (GIT-GET-PROJECT PROJECT 'PROJECTNAME)
(GIT-MAKE-BRANCH NIL NEXTTITLESTRING PROJECT))
(CL:WHEN [SETQ BRANCH (IF BRANCH
THEN (GIT-LONG-NAME BRANCH NIL PROJECT)
ELSE (GIT-PICK-BRANCH (GIT-BRANCHES 'LOCAL PROJECT T)
(CONCAT (L-CASE (GIT-GET-PROJECT PROJECT 'PROJECTNAME)
T)
" branches"]
(GIT-CHECKOUT BRANCH PROJECT))))
(GIT-CHECKOUT BRANCH PROJECT))))
(DEFCOMMAND b? (PROJECT) (SETQ PROJECT (GIT-GET-PROJECT PROJECT))
(GIT-FETCH PROJECT)
(CONCAT (L-CASE (GIT-GET-PROJECT PROJECT 'PROJECTNAME)
(DEFCOMMAND b? (PROJECT) (SETQ PROJECT (GIT-GET-PROJECT PROJECT))
(GIT-FETCH PROJECT)
(CONCAT (L-CASE (GIT-GET-PROJECT PROJECT 'PROJECTNAME)
T)
" "
(GIT-WHICH-BRANCH PROJECT)))
(GIT-WHICH-BRANCH PROJECT)))
(DEFCOMMAND cdg (PROJECT SUBDIR) (CL:UNLESS (GIT-GET-PROJECT PROJECT NIL T)
(SETQ SUBDIR PROJECT)
(SETQ PROJECT GIT-DEFAULT-PROJECT))
(CL:WHEN [AND SUBDIR (NOT (MEMB (CHCON1 SUBDIR))
(CHARCODE (> /]
(SETQ SUBDIR (CONCAT SUBDIR "/")))
(SLASHIT (/CNDIR (CONCAT (GIT-GET-PROJECT PROJECT 'GITHOST)
(OR SUBDIR "")))
(DEFCOMMAND cdg (PROJECT SUBDIR) (CL:UNLESS (GIT-GET-PROJECT PROJECT NIL T)
(SETQ SUBDIR PROJECT)
(SETQ PROJECT GIT-DEFAULT-PROJECT))
(CL:WHEN [AND SUBDIR (NOT (MEMB (CHCON1 SUBDIR))
(CHARCODE (> /]
(SETQ SUBDIR (CONCAT SUBDIR "/")))
(SLASHIT (/CNDIR (CONCAT (GIT-GET-PROJECT PROJECT 'GITHOST)
(OR SUBDIR "")))
T))
(DEFCOMMAND cdw (PROJECT SUBDIR) (CL:UNLESS (GIT-GET-PROJECT PROJECT NIL T)
(SETQ SUBDIR PROJECT)
(SETQ PROJECT GIT-DEFAULT-PROJECT))
(CL:WHEN [AND SUBDIR (NOT (MEMB (CHCON1 SUBDIR))
(CHARCODE (> /]
(SETQ SUBDIR (CONCAT SUBDIR "/")))
(SLASHIT (/CNDIR (CONCAT (GIT-GET-PROJECT PROJECT 'WHOST)
(OR SUBDIR "")))
(DEFCOMMAND cdw (PROJECT SUBDIR) (CL:UNLESS (GIT-GET-PROJECT PROJECT NIL T)
(SETQ SUBDIR PROJECT)
(SETQ PROJECT GIT-DEFAULT-PROJECT))
(CL:WHEN [AND SUBDIR (NOT (MEMB (CHCON1 SUBDIR))
(CHARCODE (> /]
(SETQ SUBDIR (CONCAT SUBDIR "/")))
(SLASHIT (/CNDIR (CONCAT (GIT-GET-PROJECT PROJECT 'WHOST)
(OR SUBDIR "")))
T))
(DEFINEQ
@@ -616,12 +617,12 @@
(* ;; "")
(* ;; "")
(* ;; "File correspondents")
(* ;; "File correspondents")
(DEFINEQ
@@ -864,12 +865,12 @@
(* ;; "")
(* ;; "")
(* ;; "Git commands")
(* ;; "Git commands")
(DEFINEQ
@@ -1073,7 +1074,7 @@
(* ;; "Differences")
(* ;; "Differences")
(DEFINEQ
@@ -1261,12 +1262,12 @@
(* ;; "")
(* ;; "")
(* ;; "Branches")
(* ;; "Branches")
(DEFINEQ
@@ -1574,7 +1575,7 @@
(* ;; "My branches")
(* ;; "My branches")
(DEFINEQ
@@ -1641,12 +1642,12 @@
(* ;; "")
(* ;; "")
(* ;; "Worktrees")
(* ;; "Worktrees")
(DEFINEQ
@@ -1717,12 +1718,12 @@
(* ;; "")
(* ;; "")
(* ;; "Comparisons")
(* ;; "Comparisons")
(DEFINEQ
@@ -1934,98 +1935,100 @@
else '(0 differences))
else '(0 differences])
(GIT-WORKING-COMPARE-DIRECTORIES
(GIT-WORKING-COMPARE-DIRECTORIES
[LAMBDA (SUBDIRS SELECT EXCLUDEDFILES FIXDIRECTORYDATES UPDATE PROJECT)
(* ;; "Edited 12-Jun-2024 22:52 by mth")
(* ;; "Edited 29-Apr-2025 15:14 by rmk")
(* ;; "Edited 26-Sep-2023 22:41 by rmk")
(* ;; "Edited 12-Jun-2024 22:52 by mth")
(* ;; "Edited 17-Jun-2023 22:54 by rmk")
(* ;; "Edited 26-Sep-2023 22:41 by rmk")
(* ;; "Edited 10-Jun-2023 21:32 by rmk")
(* ;; "Edited 17-Jun-2023 22:54 by rmk")
(* ;; "Edited 20-Jul-2022 21:18 by rmk")
(* ;; "Edited 10-Jun-2023 21:32 by rmk")
(* ;; "Edited 25-Jun-2022 21:37 by rmk")
(* ;; "Edited 20-Jul-2022 21:18 by rmk")
(* ;; "Edited 17-May-2022 17:39 by rmk")
(* ;; "Edited 25-Jun-2022 21:37 by rmk")
(* ;; "Edited 10-May-2022 10:41 by rmk")
(* ;; "Edited 17-May-2022 17:39 by rmk")
(* ;; "Edited 10-May-2022 10:41 by rmk")
(* ;;
 "Edited 29-Mar-2022 13:58 by rmk: working medley subdirectories with the current local git branch.")
"Edited 29-Mar-2022 13:58 by rmk: working medley subdirectories with the current local git branch.")
(SETQ PROJECT (GIT-GET-PROJECT PROJECT))
(CL:WHEN UPDATE (GIT-REMOTE-UPDATE NIL PROJECT)) (* ; "Doesn't matter if we are looking only at local files in the current branch. We aren't fetching or checking out.")
(CL:UNLESS (AND (fetch GITHOST of PROJECT)
(fetch WHOST of PROJECT))
(ERROR (fetch PROJECTNAME of PROJECT)
(SETQ PROJECT (GIT-GET-PROJECT PROJECT))
(CL:WHEN UPDATE (GIT-REMOTE-UPDATE NIL PROJECT)) (* ; "Doesn't matter if we are looking only at local files in the current branch. We aren't fetching or checking out.")
(CL:UNLESS (AND (fetch GITHOST of PROJECT)
(fetch WHOST of PROJECT))
(ERROR (fetch PROJECTNAME of PROJECT)
" does not have both git and working directories"))
(CL:WHEN (AND (LISTP SUBDIRS)
(NULL (CDR SUBDIRS)))
(SETQ SUBDIRS (CAR SUBDIRS)))
(CL:WHEN (AND (LISTP SUBDIRS)
(NULL (CDR SUBDIRS)))
(SETQ SUBDIRS (CAR SUBDIRS)))
(CL:UNLESS SUBDIRS
(SETQ SUBDIRS (OR (fetch DEFAULTSUBDIRS of PROJECT)
(SETQ SUBDIRS (OR (fetch DEFAULTSUBDIRS of PROJECT)
'ALL)))
(SETQ SUBDIRS (L-CASE SUBDIRS))
(LET ((SUBDIRSTRING (if (EQ SUBDIRS 'all)
then (SETQ SUBDIRS (ALLSUBDIRS PROJECT))
(SETQ SUBDIRS (L-CASE SUBDIRS))
(LET ((SUBDIRSTRING (if (EQ SUBDIRS 'all)
then (SETQ SUBDIRS (ALLSUBDIRS PROJECT))
"ALL subdirectories"
else SUBDIRS)))
(for SUBDIR TITLE CDVAL (WPROJ _ (CONCAT "Working " (L-CASE (fetch PROJECTNAME of PROJECT)
else SUBDIRS)))
(for SUBDIR TITLE CDVAL (WPROJ _ (CONCAT "Working " (L-CASE (fetch PROJECTNAME of PROJECT)
T)))
(NENTRIES _ 0)
(BRANCH2 _ (GIT-WHICH-BRANCH PROJECT T))
first (PRINTOUT T "Comparing " SUBDIRSTRING 6 " of " WPROJ " and Git " BRANCH2 T)
(BKSYSBUF " ") inside SUBDIRS
collect (TERPRI T)
(SETQ CDVAL (COMPAREDIRECTORIES (MYMEDLEYSUBDIR SUBDIR T PROJECT)
(GITSUBDIR SUBDIR T PROJECT)
(OR SELECT '(> < ~= -* *-))
NIL
(for E DPOS in (GIT-GET-PROJECT PROJECT 'EXCLUSIONS)
collect (SETQ DPOS (STRPOS SUBDIR (FILENAMEFIELD E
(BRANCH2 _ (GIT-WHICH-BRANCH PROJECT T))
first (PRINTOUT T "Comparing " SUBDIRSTRING 6 " of " WPROJ " and Git " BRANCH2 T)
(BKSYSBUF " ") inside SUBDIRS
collect (TERPRI T)
(SETQ CDVAL (COMPAREDIRECTORIES (MYMEDLEYSUBDIR SUBDIR T PROJECT)
(GITSUBDIR SUBDIR T PROJECT)
(OR SELECT '(> < ~= -* *-))
'(*.* *>*.* .* *>.*)
(for E DPOS in (GIT-GET-PROJECT PROJECT 'EXCLUSIONS)
collect (SETQ DPOS (STRPOS SUBDIR (FILENAMEFIELD E
'DIRECTORY)
1 NIL T T FILEDIRCASEARRAY))
(CL:IF DPOS
(SUBSTRING E (ADD1 DPOS))
(SUBSTRING E (ADD1 DPOS))
E))
NIL NIL NIL FIXDIRECTORYDATES))
[for CDE in (fetch CDENTRIES of CDVAL)
do (CL:WHEN (fetch INFO1 of CDE)
(change (fetch (CDINFO FULLNAME) of (fetch INFO1 of CDE))
(UNSLASHIT DATUM T)))
(CL:WHEN (fetch INFO2 of CDE)
(change (fetch (CDINFO FULLNAME) of (fetch INFO2 of CDE))
(SLASHIT DATUM T)))]
[for CDE in (fetch CDENTRIES of CDVAL)
do (CL:WHEN (fetch INFO1 of CDE)
(change (fetch (CDINFO FULLNAME) of (fetch INFO1 of CDE))
(UNSLASHIT DATUM T)))
(CL:WHEN (fetch INFO2 of CDE)
(change (fetch (CDINFO FULLNAME) of (fetch INFO2 of CDE))
(SLASHIT DATUM T)))]
CDVAL
finally
finally
(* ;; "Set up the browsers after everything has been done, otherwise if the user doesn't pay attention it might hang waiting for a region.")
(* ;; "Set up the browsers after everything has been done, otherwise if the user doesn't pay attention it might hang waiting for a region.")
(CL:WHEN (AND (CDR $$VAL)
(CL:WHEN (AND (CDR $$VAL)
GIT-MERGE-COMPARES)
(SETQ $$VAL (CDMERGE $$VAL))
[SETQ SUBDIRS (CONCATLIST (for SUBDIR in SUBDIRS collect (CONCAT SUBDIR " "])
[for CDVAL TITLE in $$VAL as SUBDIR inside SUBDIRS
do (SETQ TITLE (CONCAT WPROJ " vs. " BRANCH2 " " SUBDIR " "
(LENGTH (fetch (CDVALUE CDENTRIES) of CDVAL))
(SETQ $$VAL (CDMERGE $$VAL))
[SETQ SUBDIRS (CONCATLIST (for SUBDIR in SUBDIRS collect (CONCAT SUBDIR " "])
[for CDVAL TITLE in $$VAL as SUBDIR inside SUBDIRS
do (SETQ TITLE (CONCAT WPROJ " vs. " BRANCH2 " " SUBDIR " "
(LENGTH (fetch (CDVALUE CDENTRIES) of CDVAL))
" files"))
[CDBROWSER CDVAL TITLE `(,WPROJ ,BRANCH2)
[CDBROWSER CDVAL TITLE `(,WPROJ ,BRANCH2)
`(BRANCH1 ,WPROJ BRANCH2 ,BRANCH2 SUBDIR ,SUBDIR LABELFN
GIT-CD-LABELFN PROJECT ,PROJECT)
GIT-CDBROWSER-SEPARATE-DIRECTIONS
`(Compare See "" Copy% <- (|Delete ALL <-| GIT-CD-MENUFN)
,@(CL:UNLESS (GIT-MAINBRANCH? BRANCH2 PROJECT T)
,@(CL:UNLESS (GIT-MAINBRANCH? BRANCH2 PROJECT T)
'("" Copy% -> (Delete% -> GIT-CD-MENUFN)))]
(CONS (CONCAT SUBDIR "/")
(for CDENTRY in (fetch CDENTRIES of CDVAL)
collect (fetch MATCHNAME of CDENTRY)))
(add NENTRIES (LENGTH (fetch (CDVALUE CDENTRIES) of CDVAL]
(SETQ LAST-WMEDLEY-CDVALUES $$VAL)
(TERPRI T)
(RETURN (LIST NENTRIES (CL:IF (EQ NENTRIES 1)
(CONS (CONCAT SUBDIR "/")
(for CDENTRY in (fetch CDENTRIES of CDVAL)
collect (fetch MATCHNAME of CDENTRY)))
(add NENTRIES (LENGTH (fetch (CDVALUE CDENTRIES) of CDVAL]
(SETQ LAST-WMEDLEY-CDVALUES $$VAL)
(TERPRI T)
(RETURN (LIST NENTRIES (CL:IF (EQ NENTRIES 1)
'difference
'differences)])
@@ -2270,16 +2273,16 @@
RB NIL PROJECT])
)
(RPAQ? FROMGITN 0)
(RPAQ? FROMGITN 0)
(* ;; "")
(* ;; "")
(* ;; "Utilities")
(* ;; "Utilities")
(DEFINEQ
@@ -2427,35 +2430,35 @@
STRING])
)
(PUTPROPS GITFNS FILETYPE :TCOMPL)
(PUTPROPS GITFNS FILETYPE :TCOMPL)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (4202 20781 (GIT-CLONEP 4212 . 5540) (GIT-INIT 5542 . 6172) (GIT-MAKE-PROJECT 6174 .
13839) (GIT-GET-PROJECT 13841 . 15766) (GIT-PUT-PROJECT-FIELD 15768 . 17409) (GIT-PROJECT-PATH 17411
. 18455) (FIND-ANCESTOR-DIRECTORY 18457 . 18806) (GIT-FIND-CLONE 18808 . 19889) (GIT-MAINBRANCH 19891
. 20286) (GIT-MAINBRANCH? 20288 . 20779)) (26244 31173 (PRC-COMMAND 26254 . 31171)) (31229 34017 (
ALLSUBDIRS 31239 . 32525) (MEDLEYSUBDIRS 32527 . 33220) (GITSUBDIRS 33222 . 34015)) (34018 38808 (
TOGIT 34028 . 35434) (FROMGIT 35436 . 36417) (GIT-DELETE-FILE 36419 . 37265) (MYMEDLEY-DELETE-FILES
37267 . 38806)) (38809 41812 (MYMEDLEYSUBDIR 38819 . 39275) (GITSUBDIR 39277 . 39720) (STRIPDIR 39722
. 40093) (STRIPHOST 40095 . 40335) (STRIPNAME 40337 . 41090) (STRIPWHERE 41092 . 41810)) (41813 43715
(GFILE4MFILE 41823 . 42186) (MFILE4GFILE 42188 . 42757) (GIT-REPO-FILENAME 42759 . 43713)) (43764
54019 (GIT-COMMIT 43774 . 44600) (GIT-PUSH 44602 . 45362) (GIT-PULL 45364 . 46116) (GIT-APPROVAL 46118
. 46467) (GIT-GET-FILE 46469 . 48384) (GIT-FILE-EXISTS? 48386 . 48660) (GIT-REMOTE-UPDATE 48662 .
49497) (GIT-REMOTE-ADD 49499 . 49806) (GIT-FILE-DATE 49808 . 50855) (GIT-FILE-HISTORY 50857 . 52791) (
GIT-PRINT-FILE-HISTORY 52793 . 53843) (GIT-FETCH 53845 . 54017)) (54049 65169 (GIT-BRANCH-DIFF 54059
. 60806) (GIT-COMMIT-DIFFS 60808 . 61481) (GIT-BRANCH-RELATIONS 61483 . 65167)) (65214 84600 (
GIT-BRANCH-NUM 65224 . 65797) (GIT-CHECKOUT 65799 . 67085) (GIT-WHICH-BRANCH 67087 . 67494) (
GIT-MAKE-BRANCH 67496 . 70075) (GIT-BRANCHES 70077 . 72672) (GIT-BRANCH-EXISTS? 72674 . 73545) (
GIT-PICK-BRANCH 73547 . 74037) (GIT-BRANCH-MENU 74039 . 74920) (GIT-BRANCH-WHENSELECTEDFN 74922 .
77461) (GIT-PULL-REQUESTS 77463 . 80981) (GIT-SHORT-BRANCH-NAME 80983 . 81274) (GIT-LONG-NAME 81276 .
81593) (GIT-PRC-BRANCHES 81595 . 84598)) (84630 88078 (GIT-MY-CURRENT-BRANCH 84640 . 85010) (
GIT-MY-BRANCHP 85012 . 85630) (GIT-MY-NEXT-BRANCH 85632 . 86126) (GIT-MY-BRANCHES 86128 . 88076)) (
88124 92199 (GIT-ADD-WORKTREE 88134 . 89741) (GIT-REMOVE-WORKTREE 89743 . 90673) (GIT-LIST-WORKTREES
90675 . 91479) (WORKTREEDIR 91481 . 92197)) (92247 125381 (GIT-GET-DIFFERENT-FILES 92257 . 98681) (
GIT-BRANCHES-COMPARE-DIRECTORIES 98683 . 105914) (GIT-WORKING-COMPARE-DIRECTORIES 105916 . 111364) (
GIT-COMPARE-WORKTREE 111366 . 115344) (GITCDOBJBUTTONFN 115346 . 119836) (GIT-CD-LABELFN 119838 .
120920) (GIT-CD-MENUFN 120922 . 123362) (GIT-WORKING-COMPARE-FILES 123364 . 123984) (
GIT-BRANCHES-COMPARE-FILES 123986 . 125150) (GIT-PR-COMPARE 125152 . 125379)) (125451 133774 (CDGITDIR
125461 . 126148) (GIT-COMMAND 126150 . 127708) (GITORIGIN 127710 . 128407) (GIT-INITIALS 128409 .
128713) (GIT-COMMAND-TO-FILE 128715 . 132200) (GIT-RESULT-TO-LINES 132202 . 133107) (STRIPLOCAL 133109
. 133772)))))
(FILEMAP (NIL (4225 20804 (GIT-CLONEP 4235 . 5563) (GIT-INIT 5565 . 6195) (GIT-MAKE-PROJECT 6197 .
13862) (GIT-GET-PROJECT 13864 . 15789) (GIT-PUT-PROJECT-FIELD 15791 . 17432) (GIT-PROJECT-PATH 17434
. 18478) (FIND-ANCESTOR-DIRECTORY 18480 . 18829) (GIT-FIND-CLONE 18831 . 19912) (GIT-MAINBRANCH 19914
. 20309) (GIT-MAINBRANCH? 20311 . 20802)) (26471 31400 (PRC-COMMAND 26481 . 31398)) (31448 34236 (
ALLSUBDIRS 31458 . 32744) (MEDLEYSUBDIRS 32746 . 33439) (GITSUBDIRS 33441 . 34234)) (34237 39027 (
TOGIT 34247 . 35653) (FROMGIT 35655 . 36636) (GIT-DELETE-FILE 36638 . 37484) (MYMEDLEY-DELETE-FILES
37486 . 39025)) (39028 42031 (MYMEDLEYSUBDIR 39038 . 39494) (GITSUBDIR 39496 . 39939) (STRIPDIR 39941
. 40312) (STRIPHOST 40314 . 40554) (STRIPNAME 40556 . 41309) (STRIPWHERE 41311 . 42029)) (42032 43934
(GFILE4MFILE 42042 . 42405) (MFILE4GFILE 42407 . 42976) (GIT-REPO-FILENAME 42978 . 43932)) (43975
54230 (GIT-COMMIT 43985 . 44811) (GIT-PUSH 44813 . 45573) (GIT-PULL 45575 . 46327) (GIT-APPROVAL 46329
. 46678) (GIT-GET-FILE 46680 . 48595) (GIT-FILE-EXISTS? 48597 . 48871) (GIT-REMOTE-UPDATE 48873 .
49708) (GIT-REMOTE-ADD 49710 . 50017) (GIT-FILE-DATE 50019 . 51066) (GIT-FILE-HISTORY 51068 . 53002) (
GIT-PRINT-FILE-HISTORY 53004 . 54054) (GIT-FETCH 54056 . 54228)) (54256 65376 (GIT-BRANCH-DIFF 54266
. 61013) (GIT-COMMIT-DIFFS 61015 . 61688) (GIT-BRANCH-RELATIONS 61690 . 65374)) (65413 84799 (
GIT-BRANCH-NUM 65423 . 65996) (GIT-CHECKOUT 65998 . 67284) (GIT-WHICH-BRANCH 67286 . 67693) (
GIT-MAKE-BRANCH 67695 . 70274) (GIT-BRANCHES 70276 . 72871) (GIT-BRANCH-EXISTS? 72873 . 73744) (
GIT-PICK-BRANCH 73746 . 74236) (GIT-BRANCH-MENU 74238 . 75119) (GIT-BRANCH-WHENSELECTEDFN 75121 .
77660) (GIT-PULL-REQUESTS 77662 . 81180) (GIT-SHORT-BRANCH-NAME 81182 . 81473) (GIT-LONG-NAME 81475 .
81792) (GIT-PRC-BRANCHES 81794 . 84797)) (84825 88273 (GIT-MY-CURRENT-BRANCH 84835 . 85205) (
GIT-MY-BRANCHP 85207 . 85825) (GIT-MY-NEXT-BRANCH 85827 . 86321) (GIT-MY-BRANCHES 86323 . 88271)) (
88311 92386 (GIT-ADD-WORKTREE 88321 . 89928) (GIT-REMOVE-WORKTREE 89930 . 90860) (GIT-LIST-WORKTREES
90862 . 91666) (WORKTREEDIR 91668 . 92384)) (92426 125819 (GIT-GET-DIFFERENT-FILES 92436 . 98860) (
GIT-BRANCHES-COMPARE-DIRECTORIES 98862 . 106093) (GIT-WORKING-COMPARE-DIRECTORIES 106095 . 111802) (
GIT-COMPARE-WORKTREE 111804 . 115782) (GITCDOBJBUTTONFN 115784 . 120274) (GIT-CD-LABELFN 120276 .
121358) (GIT-CD-MENUFN 121360 . 123800) (GIT-WORKING-COMPARE-FILES 123802 . 124422) (
GIT-BRANCHES-COMPARE-FILES 124424 . 125588) (GIT-PR-COMPARE 125590 . 125817)) (125881 134204 (CDGITDIR
125891 . 126578) (GIT-COMMAND 126580 . 128138) (GITORIGIN 128140 . 128837) (GIT-INITIALS 128839 .
129143) (GIT-COMMAND-TO-FILE 129145 . 132630) (GIT-RESULT-TO-LINES 132632 . 133537) (STRIPLOCAL 133539
. 134202)))))
STOP

Binary file not shown.

Binary file not shown.

View File

@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "13-May-2024 22:37:13" {WMEDLEY}<lispusers>JSON.;36 9198
(FILECREATED " 7-May-2025 13:57:04" {WMEDLEY}<lispusers>JSON.;38 9891
:EDIT-BY rmk
:CHANGES-TO (FNS JSON-GET)
:PREVIOUS-DATE "13-May-2024 19:23:02" {WMEDLEY}<lispusers>JSON.;33)
:PREVIOUS-DATE "13-May-2024 22:37:13" {WMEDLEY}<lispusers>JSON.;36)
(PRETTYCOMPRINT JSONCOMS)
@@ -177,14 +177,24 @@
NIL])
(JSON-GET
[LAMBDA (OBJECT ATTRIBUTES) (* ; "Edited 13-May-2024 22:35 by rmk")
[LAMBDA (OBJECT ATTRIBUTES) (* ; "Edited 7-May-2025 13:56 by rmk")
(* ; "Edited 13-May-2024 22:35 by rmk")
(* ; "Edited 30-Apr-2024 14:26 by rmk")
(* ;; "Returns the value at the end of a chain of ATTRIBUTES in OBJECT")
(for A (OBJ _ OBJECT) inside ATTRIBUTES do (if (EQ 'OBJECT (CAR (LISTP OBJ)))
then [SETQ OBJ (CADR (ASSOC A (CDR OBJ]
else (RETURN NIL)) finally (RETURN OBJ])
(for A (OBJ _ OBJECT) inside ATTRIBUTES do (SELECTQ (CAR (LISTP OBJ))
(OBJECT [SETQ OBJ (CADR (ASSOC A (CDR OBJ])
(ARRAY (CL:UNLESS (AND (FIXP A)
(IGEQ A 0))
(ERROR A
" cannot index a JSON array")
)
(* ;; "ADD1 because zero-origin")
[SETQ OBJ (CAR (NTH OBJ (ADD1 A])
(RETURN NIL)) finally (RETURN OBJ])
)
(DECLARE%: EVAL@COMPILE DONTCOPY
(DECLARE%: EVAL@COMPILE
@@ -201,7 +211,7 @@
)
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (559 8839 (JSON-PARSE 569 . 915) (JSON-VALUE 917 . 1286) (JSON-SKIP 1288 . 1562) (
(FILEMAP (NIL (559 9532 (JSON-PARSE 569 . 915) (JSON-VALUE 917 . 1286) (JSON-SKIP 1288 . 1562) (
JSON-STRING 1564 . 2362) (JSON-ARRAY 2364 . 3502) (JSON-OBJECT 3504 . 4961) (JSON-AVPAIR 4963 . 5405)
(JSON-NUMBER 5407 . 6921) (JSON-ATOM 6923 . 8230) (JSON-GET 8232 . 8837)))))
(JSON-NUMBER 5407 . 6921) (JSON-ATOM 6923 . 8230) (JSON-GET 8232 . 9530)))))
STOP

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "25-Nov-2024 17:59:00" {WMEDLEY}<lispusers>REGIONMANAGER.;135 42008
(FILECREATED "20-Apr-2025 12:57:07" {WMEDLEY}<lispusers>REGIONMANAGER.;137 42626
:EDIT-BY rmk
:CHANGES-TO (FNS \RELCREATEREGION.REF)
:CHANGES-TO (FNS RM-CLOSEW)
:PREVIOUS-DATE "27-Oct-2024 21:59:33" {WMEDLEY}<lispusers>REGIONMANAGER.;134)
:PREVIOUS-DATE "25-Nov-2024 17:59:00" {WMEDLEY}<lispusers>REGIONMANAGER.;135)
(PRETTYCOMPRINT REGIONMANAGERCOMS)
@@ -172,7 +172,8 @@
WINDOW])
(RM-CLOSEW
[LAMBDA (WINDOW) (* ; "Edited 10-Oct-2023 22:11 by rmk")
[LAMBDA (WINDOW) (* ; "Edited 20-Apr-2025 12:40 by rmk")
(* ; "Edited 10-Oct-2023 22:11 by rmk")
(* ;;
 "Makes the window's typed region available for reuse, if the window is marked with a TYPEDREGION.")
@@ -181,14 +182,19 @@
(* ;; "This replaces the particular typed-region in TYPED-REGIONS with the region that the window ended up with, perhaps after the user reshaped it. But (WINDOWPROP WINDOW 'REGION) doesn't include the prompt window, if it's there, and (WINDOWREGION WINDOW) would union in all of the attached windows (menus etc.) This code assumes that the promptwindow was taken out of the original region (lots of funky code does that), so it unions it back in to the REGION property to reconstruct the original typed-region. The alternative would be to have the windows region copy the original grabbed region and restore only that. But then we would be ignoring any reshaping adjustments.")
(* ;; "")
(* ;; "There is another use case (e.g. Tedit window-splitting) where the window is reshaped for temporary purposes, but the new shape is not intended to replace the original typed-region if that region is reused. If the window has the property SAVED-TYPED-REGION (presumably a copy of the original one), then that region is installed in the TYPED-REGION before it is saved back on the TYPED-REGION-LIST")
(LET* [CLOSEVAL (TYPEDREGION (WINDOWPROP WINDOW 'TYPED-REGION))
(REGIONTYPE (CAR TYPEDREGION))
(TREGION (CDR TYPEDREGION))
[PWINDOW (WINDOWP (CAR (MKLIST (WINDOWPROP WINDOW 'PROMPTWINDOW]
[WREGION (CL:IF PWINDOW
(UNIONREGIONS (WINDOWPROP WINDOW 'REGION)
(WINDOWPROP PWINDOW 'REGION))
(WINDOWPROP WINDOW 'REGION))]
[WREGION (OR (WINDOWPROP WINDOW 'SAVED-TYPED-REGION)
(CL:IF PWINDOW
(UNIONREGIONS (WINDOWPROP WINDOW 'REGION)
(WINDOWPROP PWINDOW 'REGION))
(WINDOWPROP WINDOW 'REGION))]
(TREGIONLIST (AND REGIONTYPE (OR (ASSOC REGIONTYPE TYPED-REGIONS)
(CAR (PUSH TYPED-REGIONS (CONS REGIONTYPE]
(CL:WHEN (AND (SETQ CLOSEVAL (CLOSEW.ORIG WINDOW))
@@ -746,11 +752,11 @@
)
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (1622 6740 (SET-TYPED-REGIONS 1632 . 3807) (GRAB-TYPED-REGION 3809 . 4835) (
REGISTER-TYPED-REGION 4837 . 6134) (REGION-TYPE 6136 . 6738)) (6741 14810 (RM-CREATEW 6751 . 8874) (
RM-CLOSEW 8876 . 11894) (RM-GETREGION 11896 . 14045) (CLOSE-TYPED-W 14047 . 14808)) (15453 22932 (
RELCREATEREGION 15463 . 20086) (RELGETREGION 20088 . 22695) (RELCREATEPOSITION 22697 . 22930)) (22933
30508 (\RELCREATEREGION.REF 22943 . 27465) (\RELCREATEREGION.SIZE 27467 . 30506)) (30561 39903 (
RM-ATTACHWINDOW 30571 . 39901)) (39904 41638 (CLOSEWITH 39914 . 40441) (CLOSEWITH.DOIT 40443 . 40723)
(MOVEWITH 40725 . 41248) (MOVEWITH.DOIT 41250 . 41636)))))
(FILEMAP (NIL (1611 6729 (SET-TYPED-REGIONS 1621 . 3796) (GRAB-TYPED-REGION 3798 . 4824) (
REGISTER-TYPED-REGION 4826 . 6123) (REGION-TYPE 6125 . 6727)) (6730 15428 (RM-CREATEW 6740 . 8863) (
RM-CLOSEW 8865 . 12512) (RM-GETREGION 12514 . 14663) (CLOSE-TYPED-W 14665 . 15426)) (16071 23550 (
RELCREATEREGION 16081 . 20704) (RELGETREGION 20706 . 23313) (RELCREATEPOSITION 23315 . 23548)) (23551
31126 (\RELCREATEREGION.REF 23561 . 28083) (\RELCREATEREGION.SIZE 28085 . 31124)) (31179 40521 (
RM-ATTACHWINDOW 31189 . 40519)) (40522 42256 (CLOSEWITH 40532 . 41059) (CLOSEWITH.DOIT 41061 . 41341)
(MOVEWITH 41343 . 41866) (MOVEWITH.DOIT 41868 . 42254)))))
STOP

Binary file not shown.

View File

@@ -11,7 +11,7 @@ REGIONMANAGER
4
By Ron Kaplan
This document created in December 2021, last edited September 2023.
This document created in December 2021, last edited April 2025.
Medley comes equipped with a core set of functions for specifying regions and creating the windows that occupy those regions on the screen. But it can be disruptive if not irritating to have to draw out a new ghost region for every invocation of a particular application. Thus the common applications (e.g. TEDIT, SEDIT, DINFO...) implement particular strategies to reduce the number of times that a user has to sweep out a new region. They instead default to regions that were allocated for earlier invocations that are no longer active. TEDIT for example recycles the region of a session that was recently shut down, SEDIT allocates from a list of previous regions, DINFO always uses the same region, but FILEBROWSER always prompts for a new one. Applications that do recycle their regions tend to do so indiscrimately, without regard to the current arrangement of other windows on the screen or the role that those windows may play in higher-level applications.
The REGIONMANAGER package provides simple extensions to the core region and window functions. These are aimed at giving users and application implementors more flexible and systematic control over the specification and reuse of screen regions. It introduces three new notions:
@@ -25,6 +25,7 @@ REGIONMANAGER adds overlay veneers to the core CREATEW, CLOSEW, and GETREGION fu
The REGION/INITREGION arguments may now be region-type atoms in addition to either NIL or particular regions as CREATEW and GETREGION otherwise allow. The type-atom will resolve to a region drawn from a predefined pool of regions associated with that type, if the pool has at least one that is not currently allocated to another window. If the pool has no available regions, then the pool will be enlarged with a region that the user produces from a normal ghost-region prompt, and the type-atom will then resolve to the newly installed region.
A typed-region is marked as "inuse" and therefore unavailable when CREATEW assigns it to a window, and the extended CLOSEW marks it as again available when the window is closed. The region of the most recently closed window will be offered the next time a region of its type is requested.
An example of how an application can take advantage of this facility is the TEDIT-PF-SEE package. This provides lightweight alternatives to the PF and SEE commands that print their output to scrollable read-only Tedit windows, specifying PF-TEDIT and SEE-TEDIT as their region types. The user can predefine a preference-ordered sequence of recyclable regions that bring up multiple output windows in a predictable tiled arrangement, without region-prompting for each invocation.
If a window opened with a typed region is reshaped, usually the new shape of that window is made available after closing for another window of the same type. But sometimes the reshaping is for transitory purposes, for example , the reshaping that Tedit uses to split windows, and the client wants more control over the region that will be recycled. The client can store the intended region as the value of the window property SAVED-TYPED-REGION before closing, and that is the region that will be recycled.
The global variable TYPED-REGIONS is an alist that maintains the relationship between atomic type-names and the list of regions that belong to each type. The list is ordered according to preferences set by the user, and a type-atom is always resolved to the first unused region in its list. If the user is asked to sweep out a new region, that region is added at the end, as the least preferable. The function SET-TYPED-REGIONS is provided to add or replace TYPED-REGION entries.
(SET-TYPED-REGIONS TYPELISTS REPLACE) [Function]
TYPELISTS is an alist of the form
@@ -82,10 +83,10 @@ If NEWPOS is the new position of PARENT, moves each of the move-children so that
CLASSIC
TERMINALMODERN TERMINALÿüTERMINALÿü
TIMESROMAN$  HRULE.GETFN   HRULE.GETFN  HRULE.GETFN   HRULE.GETFN  HRULE.GETFN
DÈ   }/ ¯[ <01>C×<00>T Û Á1 
@È   }/ ¯[ <01>C*§<00>T Û¬@ Á1 

; 3o)Ä ž     4 n © o2 V@1 %!  A  &MmIS-g<
3E
"

l /4 v2C ƒ &% "O=  , l¬)9š¥Ç W~ æ& 4!Uh'š2&µ$"&( )MDATE:ie½m3\¨
l /4 v2C ƒ &% "O=  , l¬)9š¥Ç W~ æ& 4!Uh'š2&µ$"&( )MDATE:iÏ*ø5V®

View File

@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "26-Mar-2025 10:09:16" {WMEDLEY}<lispusers>TEDIT-PF-SEE.;137 11103
(FILECREATED "14-Apr-2025 22:00:54" {WMEDLEY}<lispusers>TEDIT-PF-SEE.;141 11757
:EDIT-BY rmk
:CHANGES-TO (FNS PF-TEDIT)
:CHANGES-TO (FNS PF-TEDIT PF-TEDIT-FROM-TEXT)
:PREVIOUS-DATE "18-Feb-2025 23:39:40" {WMEDLEY}<lispusers>TEDIT-PF-SEE.;136)
:PREVIOUS-DATE " 7-Apr-2025 23:03:54" {WMEDLEY}<lispusers>TEDIT-PF-SEE.;140)
(PRETTYCOMPRINT TEDIT-PF-SEECOMS)
@@ -16,17 +16,19 @@
(COMMANDS ts tf)
(FILES (SYSLOAD)
REGIONMANAGER VERSIONDEFS)
(ALISTS (TEDIT.CHARACTIONS TEDIT-PF)
(TEDIT.CHARBINDINGS TEDIT-PF))
(P (MOVD? 'PFCOPYBYTES 'PFI.MAYBE.PP.DEFINITION)
(MOVD? 'NILL (FUNCTION TEDIT.SETFUNCTION))
(TEDIT.SETFUNCTION "Meta,T" (FUNCTION PF-TEDIT-FROM-TEXT))
(TEDIT.SETFUNCTION "Meta,t" (FUNCTION PF-TEDIT-FROM-TEXT)))
(TEDIT.INSTALL.CHARBINDINGS))
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA)
(NLAML)
(LAMA])
(DEFINEQ
(PF-TEDIT
[LAMBDA (FN IFILES VERSION REPRINT) (* ; "Edited 26-Mar-2025 10:08 by rmk")
[LAMBDA (FN IFILES VERSION REPRINT) (* ; "Edited 14-Apr-2025 22:00 by rmk")
(* ; "Edited 26-Mar-2025 10:08 by rmk")
(* ; "Edited 18-Feb-2025 23:39 by rmk")
(* ; "Edited 6-Dec-2024 19:15 by rmk")
(* ; "Edited 27-Aug-2024 13:03 by rmk")
@@ -67,8 +69,8 @@
(SETQ REPRINT T)
[SETQ IFILES (LDIFFERENCE IFILES '(t T])
(CL:UNLESS IFILES
(SETQ IFILES (APPEND (WHEREIS FN 'FNS T)
(WHEREIS FN 'FUNCTIONS T))))
(SETQ IFILES (WHEREIS FN '(FNS FUNCTIONS)
T)))
(IF IFILES
THEN (* ; "skip compiled files")
@@ -151,24 +153,29 @@
ELSE (PRINTOUT T FN " has no function definition" T])
(PF-TEDIT-FROM-TEXT
[LAMBDA (TSTREAM TEXTOBJ SEL) (* ; "Edited 5-Dec-2024 22:20 by rmk")
[LAMBDA (TSTREAM TEXTOBJ SEL) (* ; "Edited 14-Apr-2025 21:59 by rmk")
(* ; "Edited 7-Apr-2025 23:03 by rmk")
(* ; "Edited 5-Dec-2024 22:20 by rmk")
(* ; "Edited 26-Aug-2024 23:13 by rmk")
(* ;; "The function key for the meta,T and meta,t keys. This shows in a separate Tedit window the definition in TSTREAM of the function named by the selection SEL.")
(* ;; "The function key for the meta,T and meta,t keys. This shows in a separate Tedit window the definition in TSTREAM of the function named by the selection SEL. If this TEDIT is open on a source file that contains the selected function, that definition is used. Otherwise, the first file that WHEREIS returns.")
(SETQ TSTREAM (TEXTSTREAM TSTREAM))
(CL:UNLESS SEL
(SETQ SEL (TEDIT.GETSEL TSTREAM)))
(LET [[FILENAME (OR (TEXTPROP TSTREAM 'FILENAME)
(LET ([THISFILE (OR (TEXTPROP TSTREAM 'FILENAME)
(AND (\TEDIT.PRIMARYPANE TSTREAM)
(CADR (WINDOWPROP (\TEDIT.PRIMARYPANE TSTREAM TSTREAM)
'TF]
(FN (MKATOM (TEDIT.SEL.AS.STRING TSTREAM SEL]
(FN (MKATOM (TEDIT.SEL.AS.STRING TSTREAM SEL)))
ALLFILES)
(if (EQ 0 (NCHARS FN))
then (TEDIT.PROMPTPRINT TSTREAM "Please select a function to display" T)
elseif FILENAME
then [PF-TEDIT FN (CAR (MEMB (FILENAMEFIELD FILENAME)
(WHEREIS FN NIL T]
elseif (SETQ ALLFILES (WHEREIS FN '(FNS FUNCTIONS)
T))
then (PF-TEDIT FN (CAR (OR (MEMB (FILENAMEFIELD THISFILE)
ALLFILES)
ALLFILES)))
else (TEDIT.PROMPTPRINT TSTREAM (CONCAT FN " not found")
T])
)
@@ -189,13 +196,15 @@
(FILESLOAD (SYSLOAD)
REGIONMANAGER VERSIONDEFS)
(ADDTOVAR TEDIT.CHARACTIONS (TEDIT-PF PF-TEDIT-FROM-TEXT))
(ADDTOVAR TEDIT.CHARBINDINGS (TEDIT-PF "Meta,t" "Meta,T"))
(MOVD? 'PFCOPYBYTES 'PFI.MAYBE.PP.DEFINITION)
(MOVD? 'NILL (FUNCTION TEDIT.SETFUNCTION))
(TEDIT.SETFUNCTION "Meta,T" (FUNCTION PF-TEDIT-FROM-TEXT))
(TEDIT.SETFUNCTION "Meta,t" (FUNCTION PF-TEDIT-FROM-TEXT))
(TEDIT.INSTALL.CHARBINDINGS)
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS
(ADDTOVAR NLAMA )
@@ -205,5 +214,5 @@
(ADDTOVAR LAMA )
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (1007 10079 (PF-TEDIT 1017 . 8865) (PF-TEDIT-FROM-TEXT 8867 . 10077)))))
(FILEMAP (NIL (1017 10695 (PF-TEDIT 1027 . 8961) (PF-TEDIT-FROM-TEXT 8963 . 10693)))))
STOP

Binary file not shown.

1
loadup Symbolic link
View File

@@ -0,0 +1 @@
scripts/loadups/loadup-all.sh

1
scripts/loadup Symbolic link
View File

@@ -0,0 +1 @@
loadups/loadup-all.sh

View File

@@ -1,146 +0,0 @@
#!/bin/sh
# shellcheck disable=SC2181
main() {
# shellcheck source=./loadup-setup.sh
. "${LOADUP_SCRIPTDIR}/loadup-setup.sh"
# look thru args looking to see if -apps, --apps, or -a was specified in args
apps=""
j=1
jmax=$#
while [ "$j" -le "$jmax" ]
do
if [ "$(eval "printf %s \${${j}}")" = "-a" ] || \
[ "$(eval "printf %s \${${j}}")" = "-apps" ] || \
[ "$(eval "printf %s \${${j}}")" = "--apps" ]
then
apps="-apps"
break
fi
done
# Do loadup components
/bin/sh "${LOADUP_SCRIPTDIR}/loadup-init.sh" \
&& /bin/sh "${LOADUP_SCRIPTDIR}/loadup-mid-from-init.sh" \
&& /bin/sh "${LOADUP_SCRIPTDIR}/loadup-lisp-from-mid.sh" \
&& /bin/sh "${LOADUP_SCRIPTDIR}/loadup-full-from-lisp.sh" \
&& { \
if [ -n "${apps}" ]; \
then \
/bin/sh "${LOADUP_SCRIPTDIR}/loadup-apps-from-full.sh"; \
fi; \
} \
&& /bin/sh "${LOADUP_SCRIPTDIR}/loadup-aux.sh" \
&& /bin/sh "${LOADUP_SCRIPTDIR}/copy-all.sh" "${apps}"
if [ $? -eq 0 ]
then
echo "+++++ loadup-all.sh: SUCCESS +++++"
else
echo "----- loadup-all.sh: FAILURE -----"
fi
}
# shellcheck disable=SC2164,SC2034
if [ -z "${LOADUP_SCRIPTDIR}" ]
then
#
#
# Some functions to determine what directory this script is being executed from
#
#
get_abs_filename() {
# $1 : relative filename
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
# This function taken from
# https://stackoverflow.com/questions/29832037/how-to-get-script-directory-in-posix-sh
rreadlink() (
# Execute this function in a *subshell* to localize variables and the effect of `cd`.
target=$1
fname=
targetDir=
CDPATH=
# Try to make the execution environment as predictable as possible:
# All commands below are invoked via `command`, so we must make sure that `command`
# itself is not redefined as an alias or shell function.
# (Note that command is too inconsistent across shells, so we don't use it.)
# `command` is a *builtin* in bash, dash, ksh, zsh, and some platforms do not even have
# an external utility version of it (e.g, Ubuntu).
# `command` bypasses aliases and shell functions and also finds builtins
# in bash, dash, and ksh. In zsh, option POSIX_BUILTINS must be turned on for that
# to happen.
{ \unalias command; \unset -f command; } >/dev/null 2>&1
[ -n "$ZSH_VERSION" ] && options[POSIX_BUILTINS]=on # make zsh find *builtins* with `command` too.
while :; do # Resolve potential symlinks until the ultimate target is found.
[ -L "$target" ] || [ -e "$target" ] || { command printf '%s\n' "ERROR: '$target' does not exist." >&2; return 1; }
command cd "$(command dirname -- "$target")" # Change to target dir; necessary for correct resolution of target path.
fname=$(command basename -- "$target") # Extract filename.
[ "$fname" = '/' ] && fname='' # !! curiously, `basename /` returns '/'
if [ -L "$fname" ]; then
# Extract [next] target path, which may be defined
# *relative* to the symlink's own directory.
# Note: We parse `ls -l` output to find the symlink target
# which is the only POSIX-compliant, albeit somewhat fragile, way.
target=$(command ls -l "$fname")
target=${target#* -> }
continue # Resolve [next] symlink target.
fi
break # Ultimate target reached.
done
targetDir=$(command pwd -P) # Get canonical dir. path
# Output the ultimate target's canonical path.
# Note that we manually resolve paths ending in /. and /.. to make sure we have a normalized path.
if [ "$fname" = '.' ]; then
command printf '%s\n' "${targetDir%/}"
elif [ "$fname" = '..' ]; then
# Caveat: something like /var/.. will resolve to /private (assuming /var@ -> /private/var), i.e. the '..' is applied
# AFTER canonicalization.
command printf '%s\n' "$(command dirname -- "${targetDir}")"
else
command printf '%s\n' "${targetDir%/}/$fname"
fi
)
get_script_dir() {
# call this with $0 (from main script) as its (only) parameter
# if you need to preserve cwd, run this is a subshell since
# it can change cwd
# set -x
local_SCRIPT_PATH="$( get_abs_filename "$1" )";
while [ -h "$local_SCRIPT_PATH" ];
do
cd "$( dirname -- "$local_SCRIPT_PATH"; )";
local_SCRIPT_PATH="$( rreadlink "$local_SCRIPT_PATH" )";
done
cd "$( dirname -- "$local_SCRIPT_PATH"; )" > '/dev/null';
local_SCRIPT_PATH="$( pwd; )";
# set +x
echo "${local_SCRIPT_PATH}"
}
# end of script directory functions
###############################################################################
# figure out the script dir
LOADUP_SCRIPTDIR="$(get_script_dir "$0")"
export LOADUP_SCRIPTDIR
fi
main "$@"

1
scripts/loadup-all.sh Symbolic link
View File

@@ -0,0 +1 @@
loadups/loadup-all.sh

View File

@@ -1,123 +0,0 @@
#!/bin/sh
main () {
# shellcheck source=./loadup-setup.sh
. "${LOADUP_SCRIPTDIR}/loadup-setup.sh"
/bin/sh "${LOADUP_SCRIPTDIR}/loadup-db-from-full.sh" \
&& /bin/sh "${LOADUP_SCRIPTDIR}/copy-db.sh"
# shellcheck disable=SC2181
if [ $? -eq 0 ];
then
echo "+++++ loadup-db.sh: SUCCESS +++++"
else
echo "----- loadup-db.sh: FAILURE -----"
fi
}
# shellcheck disable=SC2164,SC2034
if [ -z "${LOADUP_SCRIPTDIR}" ]
then
#
#
# Some functions to determine what directory this script is being executed from
#
#
get_abs_filename() {
# $1 : relative filename
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
# This function taken from
# https://stackoverflow.com/questions/29832037/how-to-get-script-directory-in-posix-sh
rreadlink() (
# Execute this function in a *subshell* to localize variables and the effect of `cd`.
target=$1
fname=
targetDir=
CDPATH=
# Try to make the execution environment as predictable as possible:
# All commands below are invoked via `command`, so we must make sure that `command`
# itself is not redefined as an alias or shell function.
# (Note that command is too inconsistent across shells, so we don't use it.)
# `command` is a *builtin* in bash, dash, ksh, zsh, and some platforms do not even have
# an external utility version of it (e.g, Ubuntu).
# `command` bypasses aliases and shell functions and also finds builtins
# in bash, dash, and ksh. In zsh, option POSIX_BUILTINS must be turned on for that
# to happen.
{ \unalias command; \unset -f command; } >/dev/null 2>&1
[ -n "$ZSH_VERSION" ] && options[POSIX_BUILTINS]=on # make zsh find *builtins* with `command` too.
while :; do # Resolve potential symlinks until the ultimate target is found.
[ -L "$target" ] || [ -e "$target" ] || { command printf '%s\n' "ERROR: '$target' does not exist." >&2; return 1; }
command cd "$(command dirname -- "$target")" # Change to target dir; necessary for correct resolution of target path.
fname=$(command basename -- "$target") # Extract filename.
[ "$fname" = '/' ] && fname='' # !! curiously, `basename /` returns '/'
if [ -L "$fname" ]; then
# Extract [next] target path, which may be defined
# *relative* to the symlink's own directory.
# Note: We parse `ls -l` output to find the symlink target
# which is the only POSIX-compliant, albeit somewhat fragile, way.
target=$(command ls -l "$fname")
target=${target#* -> }
continue # Resolve [next] symlink target.
fi
break # Ultimate target reached.
done
targetDir=$(command pwd -P) # Get canonical dir. path
# Output the ultimate target's canonical path.
# Note that we manually resolve paths ending in /. and /.. to make sure we have a normalized path.
if [ "$fname" = '.' ]; then
command printf '%s\n' "${targetDir%/}"
elif [ "$fname" = '..' ]; then
# Caveat: something like /var/.. will resolve to /private (assuming /var@ -> /private/var), i.e. the '..' is applied
# AFTER canonicalization.
command printf '%s\n' "$(command dirname -- "${targetDir}")"
else
command printf '%s\n' "${targetDir%/}/$fname"
fi
)
get_script_dir() {
# call this with $0 (from main script) as its (only) parameter
# if you need to preserve cwd, run this is a subshell since
# it can change cwd
# set -x
local_SCRIPT_PATH="$( get_abs_filename "$1" )";
while [ -h "$local_SCRIPT_PATH" ];
do
cd "$( dirname -- "$local_SCRIPT_PATH"; )";
local_SCRIPT_PATH="$( rreadlink "$local_SCRIPT_PATH" )";
done
cd "$( dirname -- "$local_SCRIPT_PATH"; )" > '/dev/null';
local_SCRIPT_PATH="$( pwd; )";
# set +x
echo "${local_SCRIPT_PATH}"
}
# end of script directory functions
###############################################################################
# figure out the script dir
LOADUP_SCRIPTDIR="$(get_script_dir "$0")"
export LOADUP_SCRIPTDIR
fi
main "$@"

1
scripts/loadup-db.sh Symbolic link
View File

@@ -0,0 +1 @@
loadups/loadup-db.sh

View File

@@ -1,121 +0,0 @@
#!/bin/sh
main() {
# shellcheck source=./loadup-setup.sh
. "${LOADUP_SCRIPTDIR}/loadup-setup.sh"
/bin/sh "${LOADUP_SCRIPTDIR}/loadup-init.sh" \
&& /bin/sh "${LOADUP_SCRIPTDIR}/loadup-mid-from-init.sh" \
&& /bin/sh "${LOADUP_SCRIPTDIR}/loadup-lisp-from-mid.sh" \
&& /bin/sh "${LOADUP_SCRIPTDIR}/loadup-full-from-lisp.sh" \
&& /bin/sh "${LOADUP_SCRIPTDIR}/copy-full.sh" ;
# shellcheck disable=SC2181
if [ $? -eq 0 ];
then
echo "+++++ loadup-full.sh: SUCCESS +++++"
else
echo "----- loadup-full.sh: FAILURE -----"
fi
}
# shellcheck disable=SC2164,SC2034
if [ -z "${LOADUP_SCRIPTDIR}" ]
then
#
#
# Some functions to determine what directory this script is being executed from
#
#
get_abs_filename() {
# $1 : relative filename
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
# This function taken from
# https://stackoverflow.com/questions/29832037/how-to-get-script-directory-in-posix-sh
rreadlink() (
# Execute this function in a *subshell* to localize variables and the effect of `cd`.
target=$1
fname=
targetDir=
CDPATH=
# Try to make the execution environment as predictable as possible:
# All commands below are invoked via `command`, so we must make sure that `command`
# itself is not redefined as an alias or shell function.
# (Note that command is too inconsistent across shells, so we don't use it.)
# `command` is a *builtin* in bash, dash, ksh, zsh, and some platforms do not even have
# an external utility version of it (e.g, Ubuntu).
# `command` bypasses aliases and shell functions and also finds builtins
# in bash, dash, and ksh. In zsh, option POSIX_BUILTINS must be turned on for that
# to happen.
{ \unalias command; \unset -f command; } >/dev/null 2>&1
[ -n "$ZSH_VERSION" ] && options[POSIX_BUILTINS]=on # make zsh find *builtins* with `command` too.
while :; do # Resolve potential symlinks until the ultimate target is found.
[ -L "$target" ] || [ -e "$target" ] || { command printf '%s\n' "ERROR: '$target' does not exist." >&2; return 1; }
command cd "$(command dirname -- "$target")" # Change to target dir; necessary for correct resolution of target path.
fname=$(command basename -- "$target") # Extract filename.
[ "$fname" = '/' ] && fname='' # !! curiously, `basename /` returns '/'
if [ -L "$fname" ]; then
# Extract [next] target path, which may be defined
# *relative* to the symlink's own directory.
# Note: We parse `ls -l` output to find the symlink target
# which is the only POSIX-compliant, albeit somewhat fragile, way.
target=$(command ls -l "$fname")
target=${target#* -> }
continue # Resolve [next] symlink target.
fi
break # Ultimate target reached.
done
targetDir=$(command pwd -P) # Get canonical dir. path
# Output the ultimate target's canonical path.
# Note that we manually resolve paths ending in /. and /.. to make sure we have a normalized path.
if [ "$fname" = '.' ]; then
command printf '%s\n' "${targetDir%/}"
elif [ "$fname" = '..' ]; then
# Caveat: something like /var/.. will resolve to /private (assuming /var@ -> /private/var), i.e. the '..' is applied
# AFTER canonicalization.
command printf '%s\n' "$(command dirname -- "${targetDir}")"
else
command printf '%s\n' "${targetDir%/}/$fname"
fi
)
get_script_dir() {
# call this with $0 (from main script) as its (only) parameter
# if you need to preserve cwd, run this is a subshell since
# it can change cwd
# set -x
local_SCRIPT_PATH="$( get_abs_filename "$1" )";
while [ -h "$local_SCRIPT_PATH" ];
do
cd "$( dirname -- "$local_SCRIPT_PATH"; )";
local_SCRIPT_PATH="$( rreadlink "$local_SCRIPT_PATH" )";
done
cd "$( dirname -- "$local_SCRIPT_PATH"; )" > '/dev/null';
local_SCRIPT_PATH="$( pwd; )";
# set +x
echo "${local_SCRIPT_PATH}"
}
# end of script directory functions
###############################################################################
# figure out the script dir
LOADUP_SCRIPTDIR="$(get_script_dir "$0")"
export LOADUP_SCRIPTDIR
fi
main "$@"

1
scripts/loadup-full.sh Symbolic link
View File

@@ -0,0 +1 @@
loadups/loadup-full.sh

View File

@@ -1,191 +0,0 @@
#!to_be_sourced_only
# shellcheck shell=sh
MEDLEYDIR=$(cd "${LOADUP_SCRIPTDIR}/.."; pwd)
export MEDLEYDIR
if [ -z "${LOADUP_WORKDIR}" ]
then
LOADUP_WORKDIR=/tmp/loadups-$$
export LOADUP_WORKDIR
fi
if [ -z "${LOADUP_SOURCEDIR}" ]
then
LOADUP_SOURCEDIR="${MEDLEYDIR}/internal/loadups"
export LOADUP_SOURCEDIR
fi
if [ -z "${LOADUP_OUTDIR}" ]
then
LOADUP_OUTDIR="${MEDLEYDIR}/loadups"
export LOADUP_OUTDIR
fi
if [ -z "${LOADUP_LOGINDIR}" ]
then
LOADUP_LOGINDIR="${LOADUP_WORKDIR}/logindir"
export LOADUP_LOGINDIR
fi
if [ ! -d "${LOADUP_OUTDIR}" ];
then
if [ ! -e "${LOADUP_OUTDIR}" ];
then
mkdir -p "${LOADUP_OUTDIR}"
else
echo "Error: ${LOADUP_OUTDIR} exists but is not a directory. Exiting."
exit 1
fi
fi
if [ ! -d "${LOADUP_WORKDIR}" ];
then
if [ ! -e "${LOADUP_WORKDIR}" ];
then
mkdir -p "${LOADUP_WORKDIR}"
else
echo "Error: ${LOADUP_WORKDIR} exists but is not a directory. Exiting."
exit 1
fi
fi
HAS_GIT= [ -f $(command -v git) ] && [ -x $(command -v git) ]
export HAS_GIT
is_git_dir () {
if ${HAS_GIT}
then
return $(git -C "$1" rev-parse >/dev/null 2>/dev/null; echo $?)
else
return 1
fi
}
git_commit_ID () {
if ${HAS_GIT}
then
if is_git_dir "$1"
then
# This does NOT indicate if there are any modified files!
COMMIT_ID=$(git -C "$1" rev-parse --short HEAD)
fi
fi
}
git_commit_ID "${LOADUP_SOURCEDIR}"
LOADUP_COMMIT_ID="${COMMIT_ID}"
export LOADUP_COMMIT_ID
scr="-sc 1024x768 -g 1042x790"
geometry=1024x768
touch "${LOADUP_WORKDIR}"/loadup.timestamp
script_name=$(basename "$0" ".sh")
cmfile="${LOADUP_WORKDIR}/${script_name}.cm"
initfile="${LOADUP_WORKDIR}/${script_name}.init"
# look thru args looking to see if oldschool was specified in args
j=1
jmax=$#
while [ "$j" -le "$jmax" ]
do
if [ "$(eval "printf %s \${${j}}")" = "-os" ] || [ "$(eval "printf %s \${${j}}")" = "--oldschool" ]
then
LOADUP_OLDSCHOOL=true
export LOADUP_OLDSCHOOL
break
else
j=$(( j + 1 ))
fi
done
######################################################################
loadup_start () {
echo ">>>>> START ${script_name}"
if [ -d "${MEDLEYDIR}/tmp" ];
then
TMP_PRE_EXISTS="true"
if [ -d "${MEDLEYDIR}/tmp/logindir" ];
then
LOGINDIR_PRE_EXISTS="true"
else
LOGINDIR_PRE_EXISTS="false"
fi
else
LOGINDIR_PRE_EXISTS="false"
TMP_PRE_EXISTS="false"
fi
}
loadup_finish () {
rm -f "${cmfile}"
# 2024-05-05 FGH
# Can't use exit code for now since on MacOS exit codes appear to be inverted
# Will restore once MacOS exit code are figured out
# if [ "${exit_code}" -ne 0 ] || [ ! -f "${LOADUP_WORKDIR}/$1" ]
if [ ! -f "${LOADUP_WORKDIR}/$1" ]
then
echo "----- FAILURE -----"
exit_code=1
else
echo "+++++ SUCCESS +++++"
exit_code=0
fi
echo "..... files created ....."
if [ -f "${LOADUP_WORKDIR}/$1" ]
then
shift;
for f in "$@"
do
# shellcheck disable=SC2045,SC2086
for ff in $(ls -1 "${LOADUP_WORKDIR}"/$f);
do
# shellcheck disable=SC2010
ls -l "${ff}" 2>/dev/null | grep -v "^.*~[0-9]\+~$"
done
done
fi
if [ "${TMP_PRE_EXISTS}" = "false" ];
then
rm -rf "${MEDLEYDIR}/tmp"
else
if [ "${LOGINDIR_PRE_EXISTS}" = "false" ];
then
rm -rf "${MEDLEYDIR}/tmp/logindir"
fi
fi
echo "<<<<< END ${script_name}"
echo ""
exit ${exit_code}
}
run_medley () {
if [ ! "${LOADUP_OLDSCHOOL}" = true ]
then
/bin/sh "${MEDLEYDIR}/scripts/medley/medley.command" \
--config - \
--id loadup_+ \
--geometry "${geometry}" \
--noscroll \
--logindir "${LOADUP_LOGINDIR}" \
--rem.cm "${cmfile}" \
--greet "${initfile}" \
--sysout "$1" \
"$2" "$3" "$4" "$5" "$6" "$7" ;
exit_code=$?
else
# shellcheck disable=SC2086
"${MEDLEYDIR}/run-medley" ${scr} $2 $3 $4 $5 $6 $7 -loadup "${cmfile}" "$1"
exit_code=$?
fi
}
######################################################################

503
scripts/loadups/loadup Executable file
View File

@@ -0,0 +1,503 @@
#!/bin/sh
# shellcheck disable=SC2181
main() {
# shellcheck source=./loadup-setup.sh
. "${LOADUP_SCRIPTDIR}/loadup-setup.sh"
# process args
start=""
start_s=""
start_sysout=""
end=""
end_s=""
db=""
aux=""
nocopy=false
thinw=false
thinl=false
override_lock=false
while [ "$#" -ne 0 ];
do
case "$1" in
-t | -target | --target)
case "$2" in
a | apps | 5)
end=5
end_s=apps
aux=true
;;
a- | apps- | 5-)
end=5
end_s=apps
;;
f | full | 4)
end=4
end_s=full
;;
l | lisp | 3)
end=3
end_s=lisp
;;
m | mid | 2)
end=2
end_s=mid
;;
i | init |1)
end=1
end_s=init
;;
*)
output_error_msg "Error: unknown parameter to --start (-s) flag: $2${EOL}Exiting"
exit 1
;;
esac
shift
;;
-s | -start | --start)
case "$2" in
s | scratch | 0)
start=0
start_s=scratch
start_sysout=starter.sysout
;;
i | init | 1)
start=1
start_s=init
start_sysout=init.dlinit
;;
m | mid | 2)
start=2
start_s=mid
start_sysout=init-mid.sysout
;;
l | lisp | 3)
start=3
start_s=lisp
start_sysout=lisp.sysout
;;
f | full | 4)
start=4
start_s=full
start_sysout=full.sysout
;;
*)
output_error_msg "Error: unknown parameter to --start (-s) flag: $2${EOL}Exiting"
exit 1
;;
esac
shift
;;
-x | -aux | --aux)
aux=true
;;
-b | -db | --db)
db=true
;;
-a | -apps | --apps | -5)
end=5
end_s=apps
aux=true
;;
-a- | -apps- | --apps- | -5-)
end=5
end_s=apps
;;
-f | -full | --full | -4)
end=4
end_s=full
;;
-l | -lisp | --lisp | -3)
end=3
end_s=lisp
;;
-m | -mid | --mid | -2)
end=2
end_s=mid
;;
-i | -init | --init | -1)
end=1
end_s=init
;;
-nc | -nocopy | --nocopy)
nocopy=true
;;
-tw | -thinw | --thinw)
thinw=true
;;
-tl | -thinl | --thinl)
thinl=true
;;
-d | -maikodir | --maikodir)
if [ -n "$2" ]
then
maikodir=$(cd "$2" 2>/dev/null && pwd)
if [ -z "${maikodir}" ] || [ ! -d "${maikodir}" ]
then
output_error_msg "Error: In --maikodir (-d) command line argument, \"$2\" is not an existing directory.${EOL}Exiting"
exit 1
fi
else
output_error_msg "Error: Missing value for the --maikodir (-d) command line argument.${EOL}Exiting"
exit 1
fi
export MAIKODIR="${maikodir}"
shift
;;
-ov | -override | --override)
override_lock=true
;;
--noendmsg)
noendmsg=true
;;
-z | -man | --man )
if [ "$(uname)" = "Darwin" ]
then
/usr/bin/man "${LOADUP_SOURCEDIR}/man-page/loadup.1.gz"
else
/usr/bin/man -l "${LOADUP_SOURCEDIR}/man-page/loadup.1.gz"
fi
exit 0
;;
*)
output_error_msg "Error: unknown flag: $1${EOL}Exiting"
exit 1
;;
esac
shift
done
#
#
# check arguments
#
#
no_loadups=false
#
# check for no args or only maikodir arg and set defaults appropriately
#
if [ -z "${start}" ] && [ -z "${end}" ] && [ -z "${aux}" ] && [ -z "${db}" ]
then
end=4
end_s=full
start=0
start_s=scratch
start_sysout=starter.sysout
aux=true
db=false
if [ "${thinw}" = true ] || [ "${thinl}" = true ]
then
no_loadups=true
nocopy=true
fi
fi
#
# defaults for aux and db
#
if [ -z "${aux}" ]
then
aux=false
fi
if [ -z "${db}" ]
then
db=false
fi
#
# if no start and no end specified, then signal no stages
# otherwise if start or end is not specified, set defaults
#
if [ -z "${start}" ] && [ -z "${end}" ]
then
start=4
start_s=full
start_sysout=full.sysout
end=-1
else
if [ -z "${end}" ]
then
end=4
end_s=full
fi
if [ -z "${start}" ]
then
start=0
start_s=scratch
start_sysout=starter.sysout
fi
fi
#
# if aux and/or db is set and there is an end, the end must be full (4) or later
#
if { [ "${aux}" = true ] || [ "${db}" = true ] ; } && [ "${end}" -gt 0 ] && [ "${end}" -lt 4 ]
then
output_error_msg "Error: either -aux or -db was specified, but the ending sysout specified was \"before\" full (4)${EOL}}Exiting"
exit 1
fi
#
# End has to be greater than start unless $end is -1
#
if [ $end -ne -1 ] && [ $end -le $start ]
then
output_error_msg "Error: The final stage ($end_s) comes before or is the same as the start stage ($start_s)${EOL}Exiting"
exit 1
fi
#
# End of args checks
#
# check and set the run_lock
check_run_lock "${override_lock}"
# if requested, thin the loadups and workdirs by eliminating all versioned (*.~[0-9]*~) files
# from these directories
if [ "${thinw}" = true ]
then
"${LOADUP_SCRIPTDIR}"/thin_loadups.sh w
fi
if [ "${thinl}" = true ]
then
"${LOADUP_SCRIPTDIR}"/thin_loadups.sh l
fi
# find and place starting sysout
if [ $start -gt 0 ]
then
if [ ! -f "${LOADUP_WORKDIR}"/"${start_sysout}" ]
then
if [ -f "${LOADUP_OUTDIR}"/"${start_sysout}" ]
then
cp -p "${LOADUP_OUTDIR}"/"${start_sysout}" "${LOADUP_WORKDIR}"/"${start_sysout}"
else
output_error_msg "Error: Cannot find starting sysout (${start_sysout}) in either ${LOADUP_OUTDIR} or ${LOADUP_WORKDIR}${EOL}Exiting"
exit 1
fi
fi
fi
#
# Do individual loadups as requested
#
if [ "${no_loadups}" = false ]
then
if [ $start -lt 1 ] && [ $end -ge 1 ]
then
/bin/sh "${LOADUP_SCRIPTDIR}/loadup-init.sh"
exit_if_failure $? "${noendmsg}"
fi
if [ $start -lt 2 ] && [ $end -ge 2 ]
then
/bin/sh "${LOADUP_SCRIPTDIR}/loadup-mid-from-init.sh"
exit_if_failure $? "${noendmsg}"
fi
if [ $start -lt 3 ] && [ $end -ge 3 ]
then
/bin/sh "${LOADUP_SCRIPTDIR}/loadup-lisp-from-mid.sh"
exit_if_failure $? "${noendmsg}"
fi
if [ $start -lt 4 ] && [ $end -ge 4 ]
then
/bin/sh "${LOADUP_SCRIPTDIR}/loadup-full-from-lisp.sh"
exit_if_failure $? "${noendmsg}"
fi
if [ $start -lt 5 ] && [ $end -ge 5 ]
then
/bin/sh "${LOADUP_SCRIPTDIR}/loadup-apps-from-full.sh"
exit_if_failure $? "${noendmsg}"
fi
if [ "${aux}" = true ]
then
/bin/sh "${LOADUP_SCRIPTDIR}/loadup-aux.sh"
exit_if_failure $? "${noendmsg}"
fi
if [ "${db}" = true ]
then
/bin/sh "${LOADUP_SCRIPTDIR}/loadup-db-from-full.sh"
exit_if_failure $? "${noendmsg}"
fi
fi
#
# Done with loadups, successfully. Now copy files into loadups dir from workdir
#
if [ "${nocopy}" = false ]
then
if [ $start -eq 0 ] && [ $end -ge 1 ]
then
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/RDSYS "${MEDLEYDIR}/library" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/RDSYS.LCOM "${MEDLEYDIR}/library" \
| sed -e "s#${MEDLEYDIR}/##g"
fi
if [ $start -le 2 ] && [ $end -ge 3 ]
then
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/lisp.sysout "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/lisp.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
fi
if [ $start -le 3 ] && [ $end -ge 4 ]
then
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/full.sysout "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/full.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
fi
if [ $start -le 4 ] && [ $end -ge 5 ]
then
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/apps.sysout "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/apps.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
fi
if [ "${aux}" = true ]
then
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/whereis.hash "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/exports.all "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/whereis.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/exports.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
fi
if [ "${db}" = true ]
then
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/fuller.database "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/fuller.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
fi
fi
echo "+++++ loadup: SUCCESS +++++"
remove_run_lock
exit 0
}
# shellcheck disable=SC2164,SC2034
if [ -z "${LOADUP_SCRIPTDIR}" ]
then
#
#
# Some functions to determine what directory this script is being executed from
#
#
get_abs_filename() {
# $1 : relative filename
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
# This function taken from
# https://stackoverflow.com/questions/29832037/how-to-get-script-directory-in-posix-sh
rreadlink() (
# Execute this function in a *subshell* to localize variables and the effect of `cd`.
target=$1
fname=
targetDir=
CDPATH=
# Try to make the execution environment as predictable as possible:
# All commands below are invoked via `command`, so we must make sure that `command`
# itself is not redefined as an alias or shell function.
# (Note that command is too inconsistent across shells, so we don't use it.)
# `command` is a *builtin* in bash, dash, ksh, zsh, and some platforms do not even have
# an external utility version of it (e.g, Ubuntu).
# `command` bypasses aliases and shell functions and also finds builtins
# in bash, dash, and ksh. In zsh, option POSIX_BUILTINS must be turned on for that
# to happen.
{ \unalias command; \unset -f command; } >/dev/null 2>&1
[ -n "$ZSH_VERSION" ] && options[POSIX_BUILTINS]=on # make zsh find *builtins* with `command` too.
while :; do # Resolve potential symlinks until the ultimate target is found.
[ -L "$target" ] || [ -e "$target" ] || { command printf '%s\n' "ERROR: '$target' does not exist." >&2; return 1; }
command cd "$(command dirname -- "$target")" # Change to target dir; necessary for correct resolution of target path.
fname=$(command basename -- "$target") # Extract filename.
[ "$fname" = '/' ] && fname='' # !! curiously, `basename /` returns '/'
if [ -L "$fname" ]; then
# Extract [next] target path, which may be defined
# *relative* to the symlink's own directory.
# Note: We parse `ls -l` output to find the symlink target
# which is the only POSIX-compliant, albeit somewhat fragile, way.
target=$(command ls -l "$fname")
target=${target#* -> }
continue # Resolve [next] symlink target.
fi
break # Ultimate target reached.
done
targetDir=$(command pwd -P) # Get canonical dir. path
# Output the ultimate target's canonical path.
# Note that we manually resolve paths ending in /. and /.. to make sure we have a normalized path.
if [ "$fname" = '.' ]; then
command printf '%s\n' "${targetDir%/}"
elif [ "$fname" = '..' ]; then
# Caveat: something like /var/.. will resolve to /private (assuming /var@ -> /private/var), i.e. the '..' is applied
# AFTER canonicalization.
command printf '%s\n' "$(command dirname -- "${targetDir}")"
else
command printf '%s\n' "${targetDir%/}/$fname"
fi
)
get_script_dir() {
# call this with $0 (from main script) as its (only) parameter
# if you need to preserve cwd, run this is a subshell since
# it can change cwd
# set -x
local_SCRIPT_PATH="$( get_abs_filename "$1" )";
while [ -h "$local_SCRIPT_PATH" ];
do
cd "$( dirname -- "$local_SCRIPT_PATH"; )";
local_SCRIPT_PATH="$( rreadlink "$local_SCRIPT_PATH" )";
done
cd "$( dirname -- "$local_SCRIPT_PATH"; )" > '/dev/null';
local_SCRIPT_PATH="$( pwd; )";
# set +x
echo "${local_SCRIPT_PATH}"
}
# end of script directory functions
###############################################################################
# figure out the script dir
LOADUP_SCRIPTDIR="$(get_script_dir "$0")"
export LOADUP_SCRIPTDIR
fi
main "$@"

View File

@@ -0,0 +1 @@
loadup

View File

@@ -32,39 +32,43 @@ main() {
exit 1
fi
git_commit_ID "${NOTECARDSDIR}"
NOTECARDS_COMMIT_ID="${COMMIT_ID}"
export NOTECARDS_COMMIT_ID
git_commit_ID "${NOTECARDSDIR}"
NOTECARDS_COMMIT_ID="${COMMIT_ID}"
export NOTECARDS_COMMIT_ID
initfile="-"
cat >"${cmfile}" <<-"EOF"
cat >"${cmfile}" <<-EOF
"
(PROGN
(IL:MEDLEY-INIT-VARS 'IL:GREET)
(IL:DRIBBLE (IL:CONCAT (QUOTE {DSK})(IL:UNIX-GETENV (QUOTE LOADUP_WORKDIR))(IL:L-CASE (QUOTE /apps.dribble))))
(IL:LOAD (IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV(QUOTE ROOMSDIR))(QUOTE /ROOMS)) 'IL:SYSLOAD)
(IL:LOAD (IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV(QUOTE NOTECARDSDIR))(QUOTE |/system/NOTECARDS.LCOM|)) 'IL:SYSLOAD)
(IL:LOAD (IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV(QUOTE CLOSDIR))(QUOTE /DEFSYS.DFASL)) 'IL:SYSLOAD)
(IL:LOAD (IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV(QUOTE MEDLEYDIR))(QUOTE |lispusers/BUTTONS.LCOM|)) 'IL:SYSLOAD)
(IL:LOAD (IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV (QUOTE LOADUP_SOURCEDIR)) (QUOTE /LOADUP-APPS.LCOM)) 'IL:SYSLOAD)
(IL:PRINT (IL:UNIX-GETENV (QUOTE NOTECARDS_COMMIT_ID)))
(IL:PUTASSOC (QUOTE IL:MEDLEY) (LIST (IL:UNIX-GETENV (QUOTE LOADUP_COMMIT_ID))) IL:SYSOUTCOMMITS)
(IL:PUTASSOC (QUOTE IL:NOTECARDS) (LIST (IL:UNIX-GETENV (QUOTE NOTECARDS_COMMIT_ID))) IL:SYSOUTCOMMITS)
(IL:PRINT IL:SYSOUTCOMMITS)
(IL:HARDRESET)
(SETQ IL:LOADUP-SUCCESS
(${NL_ER_SETQ}
(PROGN
(SETQ IL:HELPFLAG ${HELPFLAG})
(IL:MEDLEY-INIT-VARS 'IL:GREET)
(IL:DRIBBLE
(IL:CONCAT (QUOTE {DSK})(IL:UNIX-GETENV (QUOTE LOADUP_WORKDIR))(IL:L-CASE (QUOTE /apps.dribble)))
)
(IL:LOAD (IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV (QUOTE LOADUP_SOURCEDIR))(QUOTE /LOADUP-CLOS.LCOM)))
(IL:LOADUP-CLOS)
(IL:LOAD (IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV (QUOTE LOADUP_SOURCEDIR))(QUOTE /LOADUP-APPS.LCOM)))
(IL:LOADUP-APPS)
(IL:DRIBBLE)
)
)
)
SHH
(PROGN
(IL:ENDLOADUP)
(CLOS::LOAD-CLOS)
(IL:|Apps.LOADUP|)
(IL:DRIBBLE)
(IL:MAKESYS
(IL:CONCAT (QUOTE {DSK})(IL:UNIX-GETENV(QUOTE LOADUP_WORKDIR))(IL:L-CASE (QUOTE /apps.sysout)))
:APPS)
(COND
(IL:LOADUP-SUCCESS
(IL:ENDLOADUP)
(SETQ IL:HELPFLAG T)
(SETQ IL:LOADUP-SUCCESS (QUOTE NOBIND))
(IL:MAKESYS
(IL:CONCAT (QUOTE {DSK})(IL:UNIX-GETENV(QUOTE LOADUP_WORKDIR)) (IL:L-CASE (QUOTE /apps.sysout)))
:APPS
)
(IL:LOGOUT T 0)
)
)
(IL:LOGOUT T)
(IL:LOGOUT T 1)
"
EOF
@@ -72,6 +76,7 @@ main() {
run_medley "${LOADUP_WORKDIR}/full.sysout"
loadup_finish "apps.sysout" "apps.*"
}

View File

@@ -11,22 +11,25 @@ main() {
initfile="-"
cat >"${cmfile}" <<-"EOF"
"
(SETQ IL:HELPFLAG ${HELPFLAG})
(PROG
((WORKDIR (IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV (QUOTE LOADUP_WORKDIR)) (QUOTE /))))
(IL:MEDLEY-INIT-VARS)
(IL:LOAD(QUOTE MEDLEY-UTILS))
(DRIBBLE (QUOTE {DSK}<TMP>FOOBAR))
(IL:LOAD (QUOTE MEDLEY-UTILS))
(IL:DRIBBLE (IL:CONCAT WORKDIR (IL:L-CASE (QUOTE exports.dribble))))
(IL:MAKE-EXPORTS-ALL (IL:CONCAT WORKDIR (IL:L-CASE (QUOTE exports.all))))
(DRIBBLE)
(IL:DRIBBLE)
(IL:PUTASSOC (QUOTE IL:MEDLEY) (LIST (IL:UNIX-GETENV (QUOTE LOADUP_COMMIT_ID))) IL:SYSOUTCOMMITS)
(IL:MAKE-WHEREIS-HASH
(IL:CONCAT WORKDIR (IL:L-CASE (QUOTE whereis.dribble)))
(IL:CONCAT WORKDIR (IL:L-CASE (QUOTE whereis.hash-tmp)))
(IL:CONCAT WORKDIR (IL:L-CASE (QUOTE whereis.hash)))
NIL NIL
)
(IL:LOGOUT T)
(IL:LOGOUT T 0)
)
(IL:LOGOUT T 1)
"
EOF

View File

@@ -9,7 +9,7 @@ main() {
SYSOUT="${MEDLEYDIR}/loadups/full.sysout"
if [ ! -f "${SYSOUT}" ];
then
echo "Error: cannot find ${SYSOUT}. Exiting."
output_error_msg "Error: cannot find ${SYSOUT}.${EOL}Exiting."
exit 1
fi
@@ -17,6 +17,7 @@ main() {
cat >"${cmfile}" <<-"EOF"
"
(SETQ IL:HELPFLAG ${HELPFLAG})
(PROG
((WORKDIR (IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV (QUOTE LOADUP_WORKDIR)) (QUOTE /))))
(SETQ IL:SYSOUTCOMMITS (LIST (LIST (QUOTE IL:MEDLEY) (IL:UNIX-GETENV (QUOTE LOADUP_COMMIT_ID)))))
@@ -28,8 +29,9 @@ main() {
(IL:CONCAT WORKDIR (IL:L-CASE (QUOTE fuller.database)))
(IL:CONCAT WORKDIR (IL:L-CASE (QUOTE fuller.sysout)))
)
(IL:LOGOUT T)
(IL:LOGOUT T 0)
)
(IL:LOGOUT T 1)
"
EOF

110
scripts/loadups/loadup-db.sh Executable file
View File

@@ -0,0 +1,110 @@
#!/bin/sh
#
# Redirect loadup-db.sh to omnibus loadup script
#
main() {
"${LOADUP_SCRIPTDIR}"/loadup -db
}
# shellcheck disable=SC2164,SC2034
if [ -z "${LOADUP_SCRIPTDIR}" ]
then
#
#
# Some functions to determine what directory this script is being executed from
#
#
get_abs_filename() {
# $1 : relative filename
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
# This function taken from
# https://stackoverflow.com/questions/29832037/how-to-get-script-directory-in-posix-sh
rreadlink() (
# Execute this function in a *subshell* to localize variables and the effect of `cd`.
target=$1
fname=
targetDir=
CDPATH=
# Try to make the execution environment as predictable as possible:
# All commands below are invoked via `command`, so we must make sure that `command`
# itself is not redefined as an alias or shell function.
# (Note that command is too inconsistent across shells, so we don't use it.)
# `command` is a *builtin* in bash, dash, ksh, zsh, and some platforms do not even have
# an external utility version of it (e.g, Ubuntu).
# `command` bypasses aliases and shell functions and also finds builtins
# in bash, dash, and ksh. In zsh, option POSIX_BUILTINS must be turned on for that
# to happen.
{ \unalias command; \unset -f command; } >/dev/null 2>&1
[ -n "$ZSH_VERSION" ] && options[POSIX_BUILTINS]=on # make zsh find *builtins* with `command` too.
while :; do # Resolve potential symlinks until the ultimate target is found.
[ -L "$target" ] || [ -e "$target" ] || { command printf '%s\n' "ERROR: '$target' does not exist." >&2; return 1; }
command cd "$(command dirname -- "$target")" # Change to target dir; necessary for correct resolution of target path.
fname=$(command basename -- "$target") # Extract filename.
[ "$fname" = '/' ] && fname='' # !! curiously, `basename /` returns '/'
if [ -L "$fname" ]; then
# Extract [next] target path, which may be defined
# *relative* to the symlink's own directory.
# Note: We parse `ls -l` output to find the symlink target
# which is the only POSIX-compliant, albeit somewhat fragile, way.
target=$(command ls -l "$fname")
target=${target#* -> }
continue # Resolve [next] symlink target.
fi
break # Ultimate target reached.
done
targetDir=$(command pwd -P) # Get canonical dir. path
# Output the ultimate target's canonical path.
# Note that we manually resolve paths ending in /. and /.. to make sure we have a normalized path.
if [ "$fname" = '.' ]; then
command printf '%s\n' "${targetDir%/}"
elif [ "$fname" = '..' ]; then
# Caveat: something like /var/.. will resolve to /private (assuming /var@ -> /private/var), i.e. the '..' is applied
# AFTER canonicalization.
command printf '%s\n' "$(command dirname -- "${targetDir}")"
else
command printf '%s\n' "${targetDir%/}/$fname"
fi
)
get_script_dir() {
# call this with $0 (from main script) as its (only) parameter
# if you need to preserve cwd, run this is a subshell since
# it can change cwd
# set -x
local_SCRIPT_PATH="$( get_abs_filename "$1" )";
while [ -h "$local_SCRIPT_PATH" ];
do
cd "$( dirname -- "$local_SCRIPT_PATH"; )";
local_SCRIPT_PATH="$( rreadlink "$local_SCRIPT_PATH" )";
done
cd "$( dirname -- "$local_SCRIPT_PATH"; )" > '/dev/null';
local_SCRIPT_PATH="$( pwd; )";
# set +x
echo "${local_SCRIPT_PATH}"
}
# end of script directory functions
###############################################################################
# figure out the script dir
LOADUP_SCRIPTDIR="$(get_script_dir "$0")"
export LOADUP_SCRIPTDIR
fi
main "$@"

View File

@@ -7,21 +7,32 @@ main() {
loadup_start
initfile="-"
cat >"${cmfile}" <<-"EOF"
cat >"${cmfile}" <<-EOF
"
(PROGN
(IL:LOAD (IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV (QUOTE LOADUP_SOURCEDIR))(QUOTE /LOADUP-FULL.LCOM)))
(IL:LOADUP-FULL (IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV(QUOTE LOADUP_WORKDIR))(IL:L-CASE (QUOTE /full.dribble))))
(IL:PUTASSOC (QUOTE IL:MEDLEY) (LIST (IL:UNIX-GETENV (QUOTE LOADUP_COMMIT_ID))) IL:SYSOUTCOMMITS)
(IL:HARDRESET)
)
SHH
(PROGN
(IL:ENDLOADUP)
(IL:MAKESYS (IL:CONCAT (QUOTE {DSK})(IL:UNIX-GETENV(QUOTE LOADUP_WORKDIR))(IL:L-CASE (QUOTE /full.sysout))) :FULL))
(IL:LOGOUT T)
(SETQ IL:LOADUP-SUCCESS
(${NL_ER_SETQ}
(PROGN
(SETQ IL:HELPFLAG ${HELPFLAG})
(IL:LOAD (IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV (QUOTE LOADUP_SOURCEDIR))(QUOTE /LOADUP-FULL.LCOM)))
(IL:LOADUP-FULL (IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV(QUOTE LOADUP_WORKDIR))(IL:L-CASE (QUOTE /full.dribble))))
(IL:PUTASSOC (QUOTE IL:MEDLEY) (LIST (IL:UNIX-GETENV (QUOTE LOADUP_COMMIT_ID))) IL:SYSOUTCOMMITS)
)
)
)
(COND
(IL:LOADUP-SUCCESS
(IL:ENDLOADUP)
(SETQ IL:HELPFLAG T)
(SETQ IL:LOADUP-SUCCESS (QUOTE NOBIND))
(IL:MAKESYS
(IL:CONCAT (QUOTE {DSK})(IL:UNIX-GETENV(QUOTE LOADUP_WORKDIR))(IL:L-CASE (QUOTE /full.sysout)))
:FULL
)
(IL:LOGOUT T 0)
)
)
(IL:LOGOUT T 1)
"
EOF

110
scripts/loadups/loadup-full.sh Executable file
View File

@@ -0,0 +1,110 @@
#!/bin/sh
#
# Redirect loadup-full.sh to omnibus loadup script
#
main() {
"${LOADUP_SCRIPTDIR}"/loadup -target full
}
# shellcheck disable=SC2164,SC2034
if [ -z "${LOADUP_SCRIPTDIR}" ]
then
#
#
# Some functions to determine what directory this script is being executed from
#
#
get_abs_filename() {
# $1 : relative filename
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
# This function taken from
# https://stackoverflow.com/questions/29832037/how-to-get-script-directory-in-posix-sh
rreadlink() (
# Execute this function in a *subshell* to localize variables and the effect of `cd`.
target=$1
fname=
targetDir=
CDPATH=
# Try to make the execution environment as predictable as possible:
# All commands below are invoked via `command`, so we must make sure that `command`
# itself is not redefined as an alias or shell function.
# (Note that command is too inconsistent across shells, so we don't use it.)
# `command` is a *builtin* in bash, dash, ksh, zsh, and some platforms do not even have
# an external utility version of it (e.g, Ubuntu).
# `command` bypasses aliases and shell functions and also finds builtins
# in bash, dash, and ksh. In zsh, option POSIX_BUILTINS must be turned on for that
# to happen.
{ \unalias command; \unset -f command; } >/dev/null 2>&1
[ -n "$ZSH_VERSION" ] && options[POSIX_BUILTINS]=on # make zsh find *builtins* with `command` too.
while :; do # Resolve potential symlinks until the ultimate target is found.
[ -L "$target" ] || [ -e "$target" ] || { command printf '%s\n' "ERROR: '$target' does not exist." >&2; return 1; }
command cd "$(command dirname -- "$target")" # Change to target dir; necessary for correct resolution of target path.
fname=$(command basename -- "$target") # Extract filename.
[ "$fname" = '/' ] && fname='' # !! curiously, `basename /` returns '/'
if [ -L "$fname" ]; then
# Extract [next] target path, which may be defined
# *relative* to the symlink's own directory.
# Note: We parse `ls -l` output to find the symlink target
# which is the only POSIX-compliant, albeit somewhat fragile, way.
target=$(command ls -l "$fname")
target=${target#* -> }
continue # Resolve [next] symlink target.
fi
break # Ultimate target reached.
done
targetDir=$(command pwd -P) # Get canonical dir. path
# Output the ultimate target's canonical path.
# Note that we manually resolve paths ending in /. and /.. to make sure we have a normalized path.
if [ "$fname" = '.' ]; then
command printf '%s\n' "${targetDir%/}"
elif [ "$fname" = '..' ]; then
# Caveat: something like /var/.. will resolve to /private (assuming /var@ -> /private/var), i.e. the '..' is applied
# AFTER canonicalization.
command printf '%s\n' "$(command dirname -- "${targetDir}")"
else
command printf '%s\n' "${targetDir%/}/$fname"
fi
)
get_script_dir() {
# call this with $0 (from main script) as its (only) parameter
# if you need to preserve cwd, run this is a subshell since
# it can change cwd
# set -x
local_SCRIPT_PATH="$( get_abs_filename "$1" )";
while [ -h "$local_SCRIPT_PATH" ];
do
cd "$( dirname -- "$local_SCRIPT_PATH"; )";
local_SCRIPT_PATH="$( rreadlink "$local_SCRIPT_PATH" )";
done
cd "$( dirname -- "$local_SCRIPT_PATH"; )" > '/dev/null';
local_SCRIPT_PATH="$( pwd; )";
# set +x
echo "${local_SCRIPT_PATH}"
}
# end of script directory functions
###############################################################################
# figure out the script dir
LOADUP_SCRIPTDIR="$(get_script_dir "$0")"
export LOADUP_SCRIPTDIR
fi
main "$@"

View File

@@ -30,7 +30,7 @@ main() {
(LOADUP-SOURCE-DIR (CONCAT "{DSK}" (UNIX-GETENV "LOADUP_SOURCEDIR") "/"))
)
(SETQ DIRECTORIES (CONS LOADUP-SOURCE-DIR DIRECTORIES))
(PRINT (DATE))
(PRINT (DATE))
(PRINT (SETQ SYSOUTCOMMITS (LIST (LIST (QUOTE MEDLEY) (UNIX-GETENV (QUOTE LOADUP_COMMIT_ID))))))
(RESETLST (RESETSAVE OK.TO.MODIFY.FNS T)
(MAKEINITGREET (CONCAT WORKDIR "init.sysout") (CONCAT WORKDIR "init.dlinit"))

View File

@@ -7,23 +7,30 @@ main() {
loadup_start
initfile="-"
cat >"${cmfile}" <<-"EOF"
cat >"${cmfile}" <<-EOF
"
(PROGN
(SETQ LOADUP-SUCCESS NIL)
(LOAD (CONCAT (QUOTE {DSK}) (UNIX-GETENV (QUOTE MEDLEYDIR)) (QUOTE /sources/MEDLEYDIR.LCOM)))
(MEDLEY-INIT-VARS)
(LOAD (CONCAT (QUOTE {DSK}) (UNIX-GETENV (QUOTE LOADUP_SOURCEDIR)) (QUOTE /LOADUP-LISP.LCOM)))
(LOADUP-LISP (CONCAT (QUOTE {DSK}) (UNIX-GETENV (QUOTE LOADUP_WORKDIR)) (QUOTE /lisp.dribble)))
(PUTASSOC (QUOTE MEDLEY) (LIST (UNIX-GETENV (QUOTE LOADUP_COMMIT_ID))) SYSOUTCOMMITS)
(HARDRESET)
)
SHH
(PROGN
(IL:ENDLOADUP)
(IL:MAKESYS (IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV(QUOTE LOADUP_WORKDIR)) (IL:L-CASE (QUOTE /lisp.sysout))) :LISP)
(IL:LOGOUT T)
)
(SETQ LOADUP-SUCCESS T)
(HARDRESET)
)
(COND
(IL:LOADUP-SUCCESS
(IL:ENDLOADUP)
(SETQ IL:HELPFLAG T)
(SETQ IL:LOADUP-SUCCESS (QUOTE NOBIND))
(IL:MAKESYS
(IL:CONCAT (QUOTE {DSK}) (IL:UNIX-GETENV (QUOTE LOADUP_WORKDIR)) (IL:L-CASE (QUOTE /lisp.sysout)))
:LISP)
(IL:LOGOUT T 0)
)
)
(IL:LOGOUT T 1)
"
EOF

View File

@@ -0,0 +1,297 @@
#!to_be_sourced_only
# shellcheck shell=sh
MEDLEYDIR=$(cd "${LOADUP_SCRIPTDIR}/../.." || exit; pwd)
export MEDLEYDIR
export LOADUP_CPV="${MEDLEYDIR}/scripts/cpv"
if [ -z "${LOADUP_SOURCEDIR}" ]
then
LOADUP_SOURCEDIR="${MEDLEYDIR}/internal/loadups"
export LOADUP_SOURCEDIR
fi
if [ -z "${LOADUP_OUTDIR}" ]
then
LOADUP_OUTDIR="${MEDLEYDIR}/loadups"
export LOADUP_OUTDIR
fi
if [ ! -d "${LOADUP_OUTDIR}" ];
then
if [ ! -e "${LOADUP_OUTDIR}" ];
then
mkdir -p "${LOADUP_OUTDIR}"
else
echo "Error: ${LOADUP_OUTDIR} exists but is not a directory. Exiting."
exit 1
fi
fi
if [ -z "${LOADUP_WORKDIR}" ]
then
LOADUP_WORKDIR="${LOADUP_OUTDIR}/build"
export LOADUP_WORKDIR
fi
if [ ! -d "${LOADUP_WORKDIR}" ];
then
if [ ! -e "${LOADUP_WORKDIR}" ];
then
mkdir -p "${LOADUP_WORKDIR}"
else
echo "Error: ${LOADUP_WORKDIR} exists but is not a directory. Exiting."
exit 1
fi
fi
if [ -z "${LOADUP_LOGINDIR}" ]
then
LOADUP_LOGINDIR="${LOADUP_WORKDIR}/logindir"
export LOADUP_LOGINDIR
fi
if [ ! -d "${LOADUP_LOGINDIR}" ];
then
if [ ! -e "${LOADUP_LOGINDIR}" ];
then
mkdir -p "${LOADUP_LOGINDIR}"
else
echo "Error: ${LOADUP_LOGINDIR} exists but is not a directory. Exiting."
exit 1
fi
fi
if [ -f "$(command -v git)" ] && [ -x "$(command -v git)" ]
then
export HAS_GIT=true
else
export HAS_GIT=false
fi
is_git_dir () {
if [ "${HAS_GIT}" = true ]
then
return "$(git -C "$1" rev-parse >/dev/null 2>/dev/null; echo $?)"
else
return 1
fi
}
git_commit_ID () {
if [ "${HAS_GIT}" = true ]
then
if is_git_dir "$1"
then
# This does NOT indicate if there are any modified files!
COMMIT_ID="$(git -C "$1" rev-parse --short HEAD)"
fi
fi
}
git_commit_ID "${LOADUP_SOURCEDIR}"
LOADUP_COMMIT_ID="${COMMIT_ID}"
export LOADUP_COMMIT_ID
# obsolete? scr="-sc 1024x768 -g 1042x790"
geometry=1024x768
touch "${LOADUP_WORKDIR}"/loadup.timestamp
script_name=$(basename "$0" ".sh")
cmfile="${LOADUP_WORKDIR}/${script_name}.cm"
initfile="${LOADUP_WORKDIR}/${script_name}.init"
# Select whether we use NLSETQ or ERSETQ to wrap the loadup
# cm files depending on whether we want to allow breaks or not.
# shellcheck disable=SC2034
if [ -n "${LOADUP_NOBREAK}" ]
then
HELPFLAG=NIL
NL_ER_SETQ=IL:NLSETQ
else
HELPFLAG="(QUOTE IL:BREAK!)"
NL_ER_SETQ=IL:ERSETQ
fi
######################################################################
loadup_start () {
touch "${LOADUP_WORKDIR}"/timestamp
sleep 1
echo ">>>>> START ${script_name}"
}
loadup_finish () {
if [ ! "${cmfile}" = "-" ]; then rm -f "${cmfile}"; fi
if [ ! "${initfile}" = "-" ]; then rm -f "${initfile}"; fi
if [ "${exit_code}" -ne 0 ] || [ ! -f "${LOADUP_WORKDIR}/$1" ] \
|| [ ! "$( find "${LOADUP_WORKDIR}/$1" -newer "${LOADUP_WORKDIR}"/timestamp )" ]
then
output_error_msg "----- FAILURE ${script_name}-----"
exit_code=1
else
echo "+++++ SUCCESS +++++"
exit_code=0
fi
echo "..... files created ....."
if [ -f "${LOADUP_WORKDIR}/$1" ]
then
shift;
for f in "$@"
do
# shellcheck disable=SC2045,SC2086
for ff in $(ls -1 "${LOADUP_WORKDIR}"/$f);
do
# shellcheck disable=SC2010
if [ "$( find "${ff}" -newer "${LOADUP_WORKDIR}"/timestamp )" ]
then
ls -l "${ff}" 2>/dev/null | grep -v "^.*~[0-9]\+~$"
fi
done
done
fi
echo "<<<<< END ${script_name}"
echo ""
exit ${exit_code}
}
run_medley () {
/bin/sh "${MEDLEYDIR}/scripts/medley/medley.command" \
--config - \
--id loadup_+ \
--geometry "${geometry}" \
--noscroll \
--logindir "${LOADUP_LOGINDIR}" \
--rem.cm "${cmfile}" \
--greet "${initfile}" \
--sysout "$1" \
"$2" "$3" "$4" "$5" "$6" "$7" ;
exit_code=$?
}
is_tput="$(command -v tput)"
if [ -z "${is_tput}" ]
then
is_tput="$(command -v true)"
fi
EOL="
"
output_error_msg() {
local_oem_file="${TMPDIR:-/tmp}"/oem_$$
echo "$1" >"${local_oem_file}"
while read -r line
do
echo "$(${is_tput} setab 1)$(${is_tput} setaf 7)${line}$(${is_tput} sgr0)"
done <"${local_oem_file}"
rm -f "${local_oem_file}"
}
output_warn_msg() {
local_oem_file="${TMPDIR:-/tmp}"/oem_$$
echo "$1" >"${local_oem_file}"
while read -r line
do
echo "$(${is_tput} setab 3)$(${is_tput} setaf 4)${line}$(${is_tput} sgr0)"
done <"${local_oem_file}"
rm -f "${local_oem_file}"
}
exit_if_failure() {
if [ "$1" -ne 0 ]
then
if [ ! "$2" = "true" ]
then
output_error_msg "----- ${script_name}: FAILURE -----${EOL}"
fi
remove_run_lock
exit 1
fi
}
process_maikodir() {
# process --maikodir argument. Only use when --maikodir is only possible argument
while [ "$#" -ne 0 ];
do
case "$1" in
-d | -maikodir | --maikodir)
if [ -n "$2" ]
then
maikodir=$(cd "$2" 2>/dev/null && pwd)
if [ -z "${maikodir}" ] || [ ! -d "${maikodir}" ]
then
output_error_msg "Error: In --maikodir (-d) command line argument, \"$2\" is not an existing directory.${EOL}Exiting"
exit 1
fi
else
output_error_msg "Error: Missing value for the --maikodir (-d) command line argument.${EOL}Exiting"
exit 1
fi
export MAIKODIR="${maikodir}"
shift
;;
*)
output_error_msg "Error: unknown flag: $1${EOL}Exiting"
exit 1
;;
esac
shift
done
}
export LOADUP_LOCKFILE="${LOADUP_WORKDIR}"/lock
check_run_lock() {
set +x
if [ -e "${LOADUP_LOCKFILE}" ]
then
output_warn_msg "Warning: Another loadup is already running with PID $(cat "${LOADUP_LOCKFILE}")"
if [ "${override_lock}" = true ]
then
output_warn_msg "Overriding lock preventing simultaneous loadups due to command line argument --override${EOL}Continuing."
else
loop_done=false
while [ "${loop_done}" = "false" ]
do
output_warn_msg "Do you want to override the lock guarding against simultaneous loadups?"
output_warn_msg "Answer [y, Y, n or N, default n] followed by RETURN"
read resp
if [ -z "${resp}" ]; then resp=n; fi
case "${resp}" in
n* | N* )
output_error_msg "Ok. Exiting"
exit 5
;;
y* | Y* )
output_warn_msg "Ok. Overriding lock and continuing"
loop_done=true
;;
* )
output_warn_msg "Answer not one of Y, y, N, or n. Retry."
;;
esac
done
fi
fi
echo "$$" > "${LOADUP_LOCKFILE}"
LOADUP_LOCK="$$"
}
remove_run_lock() {
if [ -n "${LOADUP_LOCK}" ]
then
rm -f "${LOADUP_LOCKFILE}"
fi
}
######################################################################

View File

@@ -1,4 +1,5 @@
#!/bin/sh
# shellcheck disable=SC2086
main() {
# shellcheck source=./loadup-setup.sh
@@ -6,45 +7,59 @@ main() {
echo ">>>>> START ${script_name}"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/full.sysout "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/lisp.sysout "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
if [ "${1}" = "-apps" ]; then
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/apps.sysout "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
fi
aux="$1"
db="$2"
no_stages="$3"
start="$4"
end="$5"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/whereis.hash "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/exports.all "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
if [ $start -eq 0 ] && [ $end -ge 1 ]
then
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/RDSYS "${MEDLEYDIR}/library" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/RDSYS.LCOM "${MEDLEYDIR}/library" \
| sed -e "s#${MEDLEYDIR}/##g"
fi
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/init.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/lisp.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/full.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/whereis.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
if [ $start -le 2 ] && [ $end -ge 3 ]
then
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/lisp.sysout "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
fi
if [ "${1}" = "-apps" ]; then
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/apps.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
fi
if [ $start -le 3 ] && [ $end -ge 4 ]
then
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/full.sysout "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
fi
if [ $start -le 3 ] && [ $end -ge 5 ]
then
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/apps.sysout "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
fi
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/RDSYS "${MEDLEYDIR}"/library \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/RDSYS.LCOM "${MEDLEYDIR}"/library \
| sed -e "s#${MEDLEYDIR}/##g"
if [ "${aux}" = true ]
then
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/whereis.hash "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/exports.all "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
fi
if [ "${db}" = true ]
then
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/fuller.database "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/fuller.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
fi
echo "<<<<< END ${script_name}"
echo ""
exit 0
}

View File

@@ -7,8 +7,8 @@ main() {
echo ">>>>> START ${script_name}"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/fuller.database "${LOADUP_OUTDIR}"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/fuller.dribble "${LOADUP_OUTDIR}"
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/fuller.database "${LOADUP_OUTDIR}"
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/fuller.dribble "${LOADUP_OUTDIR}"
echo "<<<<< END ${script_name}"
echo ""

View File

@@ -6,16 +6,16 @@ main() {
echo ">>>>> START ${script_name}"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/full.sysout "${LOADUP_OUTDIR}" \
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/full.sysout "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/lisp.sysout "${LOADUP_OUTDIR}" \
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/lisp.sysout "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/init.dribble "${LOADUP_OUTDIR}" \
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/init.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/lisp.dribble "${LOADUP_OUTDIR}" \
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/lisp.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/full.dribble "${LOADUP_OUTDIR}" \
/bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/full.dribble "${LOADUP_OUTDIR}" \
| sed -e "s#${MEDLEYDIR}/##g"
/bin/sh "${LOADUP_SCRIPTDIR}/cpv" "${LOADUP_WORKDIR}"/RDSYS "${MEDLEYDIR}"/library \

View File

@@ -0,0 +1,126 @@
#!/bin/sh
main () {
# shellcheck source=./loadup-setup.sh
. "${LOADUP_SCRIPTDIR}/loadup-setup.sh"
check_run_lock
process_maikodir "$@"
# do the loadup
/bin/sh "${LOADUP_SCRIPTDIR}/loadup-db-from-full.sh"
exit_if_failure $?
/bin/sh "${LOADUP_SCRIPTDIR}/copy-db.sh"
exit_if_failure $?
echo "+++++ loadup-db.sh: SUCCESS +++++"
remove_run_lock
exit 0
}
# shellcheck disable=SC2164,SC2034
if [ -z "${LOADUP_SCRIPTDIR}" ]
then
#
#
# Some functions to determine what directory this script is being executed from
#
#
get_abs_filename() {
# $1 : relative filename
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
# This function taken from
# https://stackoverflow.com/questions/29832037/how-to-get-script-directory-in-posix-sh
rreadlink() (
# Execute this function in a *subshell* to localize variables and the effect of `cd`.
target=$1
fname=
targetDir=
CDPATH=
# Try to make the execution environment as predictable as possible:
# All commands below are invoked via `command`, so we must make sure that `command`
# itself is not redefined as an alias or shell function.
# (Note that command is too inconsistent across shells, so we don't use it.)
# `command` is a *builtin* in bash, dash, ksh, zsh, and some platforms do not even have
# an external utility version of it (e.g, Ubuntu).
# `command` bypasses aliases and shell functions and also finds builtins
# in bash, dash, and ksh. In zsh, option POSIX_BUILTINS must be turned on for that
# to happen.
{ \unalias command; \unset -f command; } >/dev/null 2>&1
[ -n "$ZSH_VERSION" ] && options[POSIX_BUILTINS]=on # make zsh find *builtins* with `command` too.
while :; do # Resolve potential symlinks until the ultimate target is found.
[ -L "$target" ] || [ -e "$target" ] || { command printf '%s\n' "ERROR: '$target' does not exist." >&2; return 1; }
command cd "$(command dirname -- "$target")" # Change to target dir; necessary for correct resolution of target path.
fname=$(command basename -- "$target") # Extract filename.
[ "$fname" = '/' ] && fname='' # !! curiously, `basename /` returns '/'
if [ -L "$fname" ]; then
# Extract [next] target path, which may be defined
# *relative* to the symlink's own directory.
# Note: We parse `ls -l` output to find the symlink target
# which is the only POSIX-compliant, albeit somewhat fragile, way.
target=$(command ls -l "$fname")
target=${target#* -> }
continue # Resolve [next] symlink target.
fi
break # Ultimate target reached.
done
targetDir=$(command pwd -P) # Get canonical dir. path
# Output the ultimate target's canonical path.
# Note that we manually resolve paths ending in /. and /.. to make sure we have a normalized path.
if [ "$fname" = '.' ]; then
command printf '%s\n' "${targetDir%/}"
elif [ "$fname" = '..' ]; then
# Caveat: something like /var/.. will resolve to /private (assuming /var@ -> /private/var), i.e. the '..' is applied
# AFTER canonicalization.
command printf '%s\n' "$(command dirname -- "${targetDir}")"
else
command printf '%s\n' "${targetDir%/}/$fname"
fi
)
get_script_dir() {
# call this with $0 (from main script) as its (only) parameter
# if you need to preserve cwd, run this is a subshell since
# it can change cwd
# set -x
local_SCRIPT_PATH="$( get_abs_filename "$1" )";
while [ -h "$local_SCRIPT_PATH" ];
do
cd "$( dirname -- "$local_SCRIPT_PATH"; )";
local_SCRIPT_PATH="$( rreadlink "$local_SCRIPT_PATH" )";
done
cd "$( dirname -- "$local_SCRIPT_PATH"; )" > '/dev/null';
local_SCRIPT_PATH="$( pwd; )";
# set +x
echo "${local_SCRIPT_PATH}"
}
# end of script directory functions
###############################################################################
# figure out the script dir
LOADUP_SCRIPTDIR="$(get_script_dir "$0")"
export LOADUP_SCRIPTDIR
fi
main "$@"

View File

@@ -0,0 +1,120 @@
#!/bin/sh
main() {
# shellcheck source=./loadup-setup.sh
. "${LOADUP_SCRIPTDIR}/loadup-setup.sh"
process_maikodir "$@"
# do the loadup
/bin/sh "${LOADUP_SCRIPTDIR}/loadup-all.sh" --full --noendmsg
# shellcheck disable=SC2181
if [ $? -eq 0 ];
then
echo "+++++ ${script_name}: SUCCESS +++++"
else
output_error_msg "----- ${script_name}: FAILURE -----${EOL}"
fi
}
# shellcheck disable=SC2164,SC2034
if [ -z "${LOADUP_SCRIPTDIR}" ]
then
#
#
# Some functions to determine what directory this script is being executed from
#
#
get_abs_filename() {
# $1 : relative filename
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
# This function taken from
# https://stackoverflow.com/questions/29832037/how-to-get-script-directory-in-posix-sh
rreadlink() (
# Execute this function in a *subshell* to localize variables and the effect of `cd`.
target=$1
fname=
targetDir=
CDPATH=
# Try to make the execution environment as predictable as possible:
# All commands below are invoked via `command`, so we must make sure that `command`
# itself is not redefined as an alias or shell function.
# (Note that command is too inconsistent across shells, so we don't use it.)
# `command` is a *builtin* in bash, dash, ksh, zsh, and some platforms do not even have
# an external utility version of it (e.g, Ubuntu).
# `command` bypasses aliases and shell functions and also finds builtins
# in bash, dash, and ksh. In zsh, option POSIX_BUILTINS must be turned on for that
# to happen.
{ \unalias command; \unset -f command; } >/dev/null 2>&1
[ -n "$ZSH_VERSION" ] && options[POSIX_BUILTINS]=on # make zsh find *builtins* with `command` too.
while :; do # Resolve potential symlinks until the ultimate target is found.
[ -L "$target" ] || [ -e "$target" ] || { command printf '%s\n' "ERROR: '$target' does not exist." >&2; return 1; }
command cd "$(command dirname -- "$target")" # Change to target dir; necessary for correct resolution of target path.
fname=$(command basename -- "$target") # Extract filename.
[ "$fname" = '/' ] && fname='' # !! curiously, `basename /` returns '/'
if [ -L "$fname" ]; then
# Extract [next] target path, which may be defined
# *relative* to the symlink's own directory.
# Note: We parse `ls -l` output to find the symlink target
# which is the only POSIX-compliant, albeit somewhat fragile, way.
target=$(command ls -l "$fname")
target=${target#* -> }
continue # Resolve [next] symlink target.
fi
break # Ultimate target reached.
done
targetDir=$(command pwd -P) # Get canonical dir. path
# Output the ultimate target's canonical path.
# Note that we manually resolve paths ending in /. and /.. to make sure we have a normalized path.
if [ "$fname" = '.' ]; then
command printf '%s\n' "${targetDir%/}"
elif [ "$fname" = '..' ]; then
# Caveat: something like /var/.. will resolve to /private (assuming /var@ -> /private/var), i.e. the '..' is applied
# AFTER canonicalization.
command printf '%s\n' "$(command dirname -- "${targetDir}")"
else
command printf '%s\n' "${targetDir%/}/$fname"
fi
)
get_script_dir() {
# call this with $0 (from main script) as its (only) parameter
# if you need to preserve cwd, run this is a subshell since
# it can change cwd
# set -x
local_SCRIPT_PATH="$( get_abs_filename "$1" )";
while [ -h "$local_SCRIPT_PATH" ];
do
cd "$( dirname -- "$local_SCRIPT_PATH"; )";
local_SCRIPT_PATH="$( rreadlink "$local_SCRIPT_PATH" )";
done
cd "$( dirname -- "$local_SCRIPT_PATH"; )" > '/dev/null';
local_SCRIPT_PATH="$( pwd; )";
# set +x
echo "${local_SCRIPT_PATH}"
}
# end of script directory functions
###############################################################################
# figure out the script dir
LOADUP_SCRIPTDIR="$(get_script_dir "$0")"
export LOADUP_SCRIPTDIR
fi
main "$@"

126
scripts/loadups/thin_loadups.sh Executable file
View File

@@ -0,0 +1,126 @@
#!/bin/sh
#
# Thin the Medley loadups and loadups/build directories by deleting all but the latest version.
#
# 2025-04-18 Frank Halasz
#
main() {
#shellcheck source=./loadup-setup.sh
. "${LOADUP_SCRIPTDIR}"/loadup-setup.sh
if [ "$1" = "w" ] || [ "$1" = "lw" ] || [ "$1" = "wl" ]
then
find "${LOADUP_WORKDIR}" -name "*.~[0-9]*~" -delete
fi
if [ "$1" = "l" ] || [ "$1" = "lw" ] || [ "$1" = "wl" ]
then
find "${LOADUP_OUTDIR}" -name "*.~[0-9]*~" -delete
fi
}
# shellcheck disable=SC2164,SC2034
if [ -z "${LOADUP_SCRIPTDIR}" ]
then
#
#
# Some functions to determine what directory this script is being executed from
#
#
get_abs_filename() {
# $1 : relative filename
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
# This function taken from
# https://stackoverflow.com/questions/29832037/how-to-get-script-directory-in-posix-sh
rreadlink() (
# Execute this function in a *subshell* to localize variables and the effect of `cd`.
target=$1
fname=
targetDir=
CDPATH=
# Try to make the execution environment as predictable as possible:
# All commands below are invoked via `command`, so we must make sure that `command`
# itself is not redefined as an alias or shell function.
# (Note that command is too inconsistent across shells, so we don't use it.)
# `command` is a *builtin* in bash, dash, ksh, zsh, and some platforms do not even have
# an external utility version of it (e.g, Ubuntu).
# `command` bypasses aliases and shell functions and also finds builtins
# in bash, dash, and ksh. In zsh, option POSIX_BUILTINS must be turned on for that
# to happen.
{ \unalias command; \unset -f command; } >/dev/null 2>&1
[ -n "$ZSH_VERSION" ] && options[POSIX_BUILTINS]=on # make zsh find *builtins* with `command` too.
while :; do # Resolve potential symlinks until the ultimate target is found.
[ -L "$target" ] || [ -e "$target" ] || { command printf '%s\n' "ERROR: '$target' does not exist." >&2; return 1; }
command cd "$(command dirname -- "$target")" # Change to target dir; necessary for correct resolution of target path.
fname=$(command basename -- "$target") # Extract filename.
[ "$fname" = '/' ] && fname='' # !! curiously, `basename /` returns '/'
if [ -L "$fname" ]; then
# Extract [next] target path, which may be defined
# *relative* to the symlink's own directory.
# Note: We parse `ls -l` output to find the symlink target
# which is the only POSIX-compliant, albeit somewhat fragile, way.
target=$(command ls -l "$fname")
target=${target#* -> }
continue # Resolve [next] symlink target.
fi
break # Ultimate target reached.
done
targetDir=$(command pwd -P) # Get canonical dir. path
# Output the ultimate target's canonical path.
# Note that we manually resolve paths ending in /. and /.. to make sure we have a normalized path.
if [ "$fname" = '.' ]; then
command printf '%s\n' "${targetDir%/}"
elif [ "$fname" = '..' ]; then
# Caveat: something like /var/.. will resolve to /private (assuming /var@ -> /private/var), i.e. the '..' is applied
# AFTER canonicalization.
command printf '%s\n' "$(command dirname -- "${targetDir}")"
else
command printf '%s\n' "${targetDir%/}/$fname"
fi
)
get_script_dir() {
# call this with $0 (from main script) as its (only) parameter
# if you need to preserve cwd, run this is a subshell since
# it can change cwd
# set -x
local_SCRIPT_PATH="$( get_abs_filename "$1" )";
while [ -h "$local_SCRIPT_PATH" ];
do
cd "$( dirname -- "$local_SCRIPT_PATH"; )";
local_SCRIPT_PATH="$( rreadlink "$local_SCRIPT_PATH" )";
done
cd "$( dirname -- "$local_SCRIPT_PATH"; )" > '/dev/null';
local_SCRIPT_PATH="$( pwd; )";
# set +x
echo "${local_SCRIPT_PATH}"
}
# end of script directory functions
###############################################################################
# figure out the script dir
LOADUP_SCRIPTDIR="$(get_script_dir "$0")"
export LOADUP_SCRIPTDIR
fi
main "$@"

View File

@@ -13,7 +13,7 @@
export LANG=en_US.UTF-8
tr '\r' '\n' < $1 | \
sed -e 's/_/←/g' \
-e 's/^/↑/g' \
-e 's/\^/↑/g' \
-e 's///g' \
-e 's///g'\
-e 's///g' \

View File

@@ -159,7 +159,7 @@ SCRIPTDIR="$(get_script_dir "$0")"
#
###############################################################################
is_tput="$(which tput)"
is_tput="$(command -v tput)"
output_error_msg() {
local_oem_file="${TMPDIR:-/tmp}"/oem_$$
@@ -170,7 +170,7 @@ output_error_msg() {
then
echo "$(${is_tput} setab 1)$(${is_tput} setaf 7)${line}$(${is_tput} sgr0)"
else
echo "$1"
echo "${line}"
fi
done <"${local_oem_file}"
rm -f "${local_oem_file}"
@@ -620,8 +620,8 @@ sysout_stage=""
title=""
use_vnc=false
windows=false
maikodir_arg=""
maikodir_stage=""
maikodir_arg="${MAIKODIR}"
maikodir_stage="MAIKODIR env variable"
maikoprog_arg=""
greet_arg=""
noscroll=false
@@ -931,10 +931,16 @@ do
;;
--maikodir)
# for use in loadups
check_for_dash_or_end "$1" "$2"
check_dir_exists "$1" "2"
maikodir_arg="$2"
maikodir_stage="${args_stage}"
if [ "$2" = "-" ] || [ "$2" = "--" ]
then
maikodir_arg=""
maikodir_stage=""
else
check_for_dash_or_end "$1" "$2"
check_dir_exists "$1" "2"
maikodir_arg="$2"
maikodir_stage="${args_stage}"
fi
shift;
;;
-prog | --maikoprog)
@@ -1354,34 +1360,46 @@ check_for_maiko_exe () {
if [ -z "${maikodir_arg}" ]
then
if check_for_maiko_exe "${MEDLEYDIR}/maiko"
# No MAIKODIR specified. But is lde (or ldeinit) on the PATH?
# If so, use it.
maiko_exe="$(command -v "${maikoprog_arg}")"
if [ -z "${maiko_exe}" ]
then
maikodir_arg="${MEDLEYDIR}/maiko"
elif check_for_maiko_exe "${MEDLEYDIR}/../maiko"
then
maikodir_arg="$(cd "${MEDLEYDIR}/../maiko"; pwd)"
else
if ! check_if_maiko_dir "${MEDLEYDIR}/maiko" && ! check_if_maiko_dir "${MEDLEYDIR}/../maiko"
# Lde (or ledinit) is not on the PATH, check in MEDLEYDIR/maiko and in MEDLEYDIR/../maiko
if check_for_maiko_exe "${MEDLEYDIR}/maiko"
then
err_msg="ERROR: Cannot find the Maiko directory at either
\"${MEDLEYDIR}/maiko\" or \"${MEDLEYDIR}/../maiko\".
You can use the --maikodir argument to specify the Maiko directory.
Exiting."
output_error_msg "${err_msg}"
exit 53
maikodir_arg="${MEDLEYDIR}/maiko"
elif check_for_maiko_exe "${MEDLEYDIR}/../maiko"
then
maikodir_arg="$(cd "${MEDLEYDIR}/../maiko"; pwd)"
else
err_msg="ERROR: Cannot find the Maiko executable (${maiko_exe_subdir}/${maikoprog_arg}) in either
\"${MEDLEYDIR}/maiko\" or \"${MEDLEYDIR}/../maiko\".
# Not in MEDLEYDIR/maiko and in MEDLEYDIR/../maiko, put out the appropriate error msg and exit
if ! check_if_maiko_dir "${MEDLEYDIR}/maiko" && ! check_if_maiko_dir "${MEDLEYDIR}/../maiko"
then
err_msg="ERROR: The maiko executable ($maikoprog_arg) is not on the PATH and cannot find
the Maiko directory at either \"${MEDLEYDIR}/maiko\"
or \"${MEDLEYDIR}/../maiko\".
You can use the --maikodir argument or the MAIKODIR env variable
to specify the Maiko directory.
Exiting."
output_error_msg "${err_msg}"
exit 54
output_error_msg "${err_msg}"
exit 53
else
err_msg="ERROR: The maiko executable ($maikoprog_arg) is not on the PATH and cannot find
the Maiko executable (${maiko_exe_subdir}/${maikoprog_arg}) in either \"${MEDLEYDIR}/maiko\"
or \"${MEDLEYDIR}/../maiko\".
Exiting."
output_error_msg "${err_msg}"
exit 54
fi
fi
fi
elif ! check_if_maiko_dir "${maikodir_arg}" || ! check_for_maiko_exe "${maikodir_arg}"
then
# MAIKODIR is specified but lde (or ldeinit) is not in fact there. Error exit.
err_msg="In ${maikodir_stage}:
ERROR: The value of the --maikodir argument is not in fact a directory containing
the Maiko emulator (${maiko_exe_subdir}/${maikoprog_arg}).
ERROR: The value provided by \$MAIKODIR or by the --maikodir argument (${maikodir_arg}) is not
in fact a directory containing the Maiko emulator (${maiko_exe_subdir}/${maikoprog_arg}).
Exiting."
output_error_msg "${err_msg}"
exit 53

View File

@@ -30,8 +30,8 @@ sysout_stage=""
title=""
use_vnc=false
windows=false
maikodir_arg=""
maikodir_stage=""
maikodir_arg="${MAIKODIR}"
maikodir_stage="MAIKODIR env variable"
maikoprog_arg=""
greet_arg=""
noscroll=false
@@ -341,10 +341,16 @@ do
;;
--maikodir)
# for use in loadups
check_for_dash_or_end "$1" "$2"
check_dir_exists "$1" "2"
maikodir_arg="$2"
maikodir_stage="${args_stage}"
if [ "$2" = "-" ] || [ "$2" = "--" ]
then
maikodir_arg=""
maikodir_stage=""
else
check_for_dash_or_end "$1" "$2"
check_dir_exists "$1" "2"
maikodir_arg="$2"
maikodir_stage="${args_stage}"
fi
shift;
;;
-prog | --maikoprog)

View File

@@ -235,34 +235,46 @@ check_for_maiko_exe () {
if [ -z "${maikodir_arg}" ]
then
if check_for_maiko_exe "${MEDLEYDIR}/maiko"
# No MAIKODIR specified. But is lde (or ldeinit) on the PATH?
# If so, use it.
maiko_exe="$(command -v "${maikoprog_arg}")"
if [ -z "${maiko_exe}" ]
then
maikodir_arg="${MEDLEYDIR}/maiko"
elif check_for_maiko_exe "${MEDLEYDIR}/../maiko"
then
maikodir_arg="$(cd "${MEDLEYDIR}/../maiko"; pwd)"
else
if ! check_if_maiko_dir "${MEDLEYDIR}/maiko" && ! check_if_maiko_dir "${MEDLEYDIR}/../maiko"
# Lde (or ledinit) is not on the PATH, check in MEDLEYDIR/maiko and in MEDLEYDIR/../maiko
if check_for_maiko_exe "${MEDLEYDIR}/maiko"
then
err_msg="ERROR: Cannot find the Maiko directory at either
\"${MEDLEYDIR}/maiko\" or \"${MEDLEYDIR}/../maiko\".
You can use the --maikodir argument to specify the Maiko directory.
Exiting."
output_error_msg "${err_msg}"
exit 53
maikodir_arg="${MEDLEYDIR}/maiko"
elif check_for_maiko_exe "${MEDLEYDIR}/../maiko"
then
maikodir_arg="$(cd "${MEDLEYDIR}/../maiko"; pwd)"
else
err_msg="ERROR: Cannot find the Maiko executable (${maiko_exe_subdir}/${maikoprog_arg}) in either
\"${MEDLEYDIR}/maiko\" or \"${MEDLEYDIR}/../maiko\".
# Not in MEDLEYDIR/maiko and in MEDLEYDIR/../maiko, put out the appropriate error msg and exit
if ! check_if_maiko_dir "${MEDLEYDIR}/maiko" && ! check_if_maiko_dir "${MEDLEYDIR}/../maiko"
then
err_msg="ERROR: The maiko executable ($maikoprog_arg) is not on the PATH and cannot find
the Maiko directory at either \"${MEDLEYDIR}/maiko\"
or \"${MEDLEYDIR}/../maiko\".
You can use the --maikodir argument or the MAIKODIR env variable
to specify the Maiko directory.
Exiting."
output_error_msg "${err_msg}"
exit 54
output_error_msg "${err_msg}"
exit 53
else
err_msg="ERROR: The maiko executable ($maikoprog_arg) is not on the PATH and cannot find
the Maiko executable (${maiko_exe_subdir}/${maikoprog_arg}) in either \"${MEDLEYDIR}/maiko\"
or \"${MEDLEYDIR}/../maiko\".
Exiting."
output_error_msg "${err_msg}"
exit 54
fi
fi
fi
elif ! check_if_maiko_dir "${maikodir_arg}" || ! check_for_maiko_exe "${maikodir_arg}"
then
# MAIKODIR is specified but lde (or ldeinit) is not in fact there. Error exit.
err_msg="In ${maikodir_stage}:
ERROR: The value of the --maikodir argument is not in fact a directory containing
the Maiko emulator (${maiko_exe_subdir}/${maikoprog_arg}).
ERROR: The value provided by \$MAIKODIR or by the --maikodir argument (${maikodir_arg}) is not
in fact a directory containing the Maiko emulator (${maiko_exe_subdir}/${maikoprog_arg}).
Exiting."
output_error_msg "${err_msg}"
exit 53

View File

@@ -13,7 +13,7 @@
#
###############################################################################
is_tput="$(which tput)"
is_tput="$(command -v tput)"
output_error_msg() {
local_oem_file="${TMPDIR:-/tmp}"/oem_$$
@@ -24,7 +24,7 @@ output_error_msg() {
then
echo "$(${is_tput} setab 1)$(${is_tput} setaf 7)${line}$(${is_tput} sgr0)"
else
echo "$1"
echo "${line}"
fi
done <"${local_oem_file}"
rm -f "${local_oem_file}"

View File

@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "20-Apr-2025 21:58:17" {WMEDLEY}<sources>FILEPKG.;51 274528
(FILECREATED "24-Apr-2025 11:18:44" {WMEDLEY}<sources>FILEPKG.;52 274746
:EDIT-BY rmk
:CHANGES-TO (FNS WHEREIS)
:CHANGES-TO (FNS EDITCALLERS)
:PREVIOUS-DATE "18-Jul-2023 23:40:13" {WMEDLEY}<sources>FILEPKG.;50)
:PREVIOUS-DATE "20-Apr-2025 21:58:17" {WMEDLEY}<sources>FILEPKG.;51)
(PRETTYCOMPRINT FILEPKGCOMS)
@@ -3041,14 +3041,14 @@ compiling " T)
(ADDTOVAR USERMACROS
(M NIL (MAKE FILE FILE))
(M (X . Y)
(E (MARKASCHANGED (COND ((LISTP 'X)
(CAR 'X))
(T 'X))
'USERMACROS)
T)
(ORIGINAL (M X . Y))))
(ORIGINAL (M X . Y)))
(M NIL (MAKE FILE FILE)))
(ADDTOVAR EDITMACROS
(M (X . Y)
@@ -4317,6 +4317,8 @@ compiling " T)
(EDITCALLERS
[LAMBDA (ATOMS FILES COMS DEPTH)
(* ;; "Edited 24-Apr-2025 11:18 by rmk")
(* ;; "Edited 13-Jul-2023 14:56 by rmk")
(* ;; "Edited 31-Oct-2022 16:04 by rmk")
@@ -4349,8 +4351,11 @@ compiling " T)
FILES)
((STRPOS "*" FILES) (* ; "Depth 2 for TMAX>TMAX")
(FILDIR FILES (OR DEPTH 2)))
(T (LIST FILES))) unless (DIRECTORYNAMEP FILE)
(T (LIST FILES))) unless (AND NIL (DIRECTORYNAMEP FILE))
do
(* ;; "RMK: Not sure about the DIRECTORYNAMEP. UNICODE is both a directory and a file, (EDITCALLERS 'xxx 'UNICODE) would be a no-op. ")
(RESETLST
[PROG (PATTERNS CA RDTBL MAP FILESTREAM PRINTFLG ENV TOP I CASEINSENSITIVE)
(OR (SETQ FULL (FINDFILE FILE))
@@ -4860,46 +4865,46 @@ compiling " T)
(ADDTOVAR LAMA FILEPKGTYPE FILEPKGCOM FILEPKGCHANGES)
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (18886 20559 (SEARCHPRETTYTYPELST 18896 . 19865) (PRETTYDEFMACROS 19867 . 20303) (
FILEPKGCOMPROPS 20305 . 20557)) (21372 55664 (CLEANUP 21382 . 22772) (COMPILEFILES 22774 . 23050) (
COMPILEFILES0 23052 . 23865) (CONTINUEDIT 23867 . 25244) (MAKEFILE 25246 . 36972) (FILECHANGES 36974
. 39738) (FILEPKG.MERGECHANGES 39740 . 40375) (FILEPKG.CHANGEDFNS 40377 . 40689) (MAKEFILE1 40691 .
44903) (COMPILE-FILE? 44905 . 46492) (MAKEFILES 46494 . 48022) (ADDFILE 48024 . 50567) (ADDFILE0 50569
. 54693) (LISTFILES 54695 . 55662)) (56336 90135 (FILEPKGCHANGES 56346 . 57525) (GETFILEPKGTYPE 57527
. 60477) (MARKASCHANGED 60479 . 62110) (FILECOMS 62112 . 62496) (WHEREIS 62498 . 64240) (
SMASHFILECOMS 64242 . 64470) (FILEFNSLST 64472 . 64638) (FILECOMSLST 64640 . 65126) (UPDATEFILES 65128
. 69626) (INFILECOMS? 69628 . 71471) (INFILECOMTAIL 71473 . 72591) (INFILECOMS 72593 . 72754) (
INFILECOM 72756 . 82774) (INFILECOMSVALS 82776 . 83083) (INFILECOMSVAL 83085 . 84093) (INFILECOMSPROP
84095 . 84888) (IFCPROPS 84890 . 85970) (IFCEXPRTYPE 85972 . 86588) (IFCPROPSCAN 86590 . 87551) (
IFCDECLARE 87553 . 88812) (INFILEPAIRS 88814 . 89113) (INFILECOMSMACRO 89115 . 90133)) (90170 120856 (
FILES? 90180 . 92291) (FILES?1 92293 . 92995) (FILES?PRINTLST 92997 . 93779) (ADDTOFILES? 93781 .
104324) (ADDTOFILE 104326 . 105242) (WHATIS 105244 . 107220) (ADDTOCOMS 107222 . 108760) (ADDTOCOM
108762 . 115249) (ADDTOCOM1 115251 . 116422) (ADDNEWCOM 116424 . 117474) (MAKENEWCOM 117476 . 119323)
(DEFAULTMAKENEWCOM 119325 . 120854)) (120926 123743 (MERGEINSERT 120936 . 123279) (MERGEINSERT1 123281
. 123741)) (123897 125258 (ADDTOFILEKEYLST 123907 . 125256)) (125375 136176 (DELFROMFILES 125385 .
126215) (DELFROMCOMS 126217 . 127896) (DELFROMCOM 127898 . 133663) (DELFROMCOM1 133665 . 134464) (
REMOVEITEM 134466 . 135342) (MOVETOFILE 135344 . 136174)) (136390 138761 (SAVEPUT 136400 . 138759)) (
138886 147129 (UNMARKASCHANGED 138896 . 140380) (PREEDITFN 140382 . 142863) (POSTEDITPROPS 142865 .
145159) (POSTEDITALISTS 145161 . 147127)) (147274 166744 (ALISTS.GETDEF 147284 . 147663) (
ALISTS.WHENCHANGED 147665 . 148311) (CLEARCLISPARRAY 148313 . 149491) (EXPRESSIONS.WHENCHANGED 149493
. 149871) (MAKEALISTCOMS 149873 . 150888) (MAKEFILESCOMS 150890 . 152220) (MAKELISPXMACROSCOMS 152222
. 154240) (MAKEPROPSCOMS 154242 . 154868) (MAKEUSERMACROSCOMS 154870 . 156687) (PROPS.WHENCHANGED
156689 . 157310) (FILEGETDEF.LISPXMACROS 157312 . 158611) (FILEGETDEF.ALISTS 158613 . 159204) (
FILEGETDEF.RECORDS 159206 . 160133) (FILEGETDEF.PROPS 160135 . 160930) (FILEGETDEF.MACROS 160932 .
161814) (FILEGETDEF.VARS 161816 . 162419) (FILEGETDEF.FNS 162421 . 163661) (FILEPKGCOMS.PUTDEF 163663
. 165605) (FILES.PUTDEF 165607 . 166475) (VARS.PUTDEF 166477 . 166620) (FILES.WHENCHANGED 166622 .
166742)) (168766 175997 (RENAME 168776 . 170221) (CHANGECALLERS 170223 . 175995)) (175998 223907 (
SHOWDEF 176008 . 177205) (COPYDEF 177207 . 179955) (GETDEF 179957 . 182500) (GETDEFCOM 182502 . 183468
) (GETDEFCOM0 183470 . 184663) (GETDEFCURRENT 184665 . 190977) (GETDEFERR 190979 . 192249) (
GETDEFFROMFILE 192251 . 196480) (GETDEFSAVED 196482 . 197570) (PUTDEF 197572 . 198279) (EDITDEF 198281
. 199264) (DEFAULT.EDITDEF 199266 . 202104) (EDITDEF.FILES 202106 . 202311) (LOADDEF 202313 . 202489)
(DWIMDEF 202491 . 203345) (DELDEF 203347 . 206241) (DELFROMLIST 206243 . 206747) (HASDEF 206749 .
212986) (GETFILEDEF 212988 . 213500) (SAVEDEF 213502 . 215190) (UNSAVEDEF 215192 . 216088) (
COMPAREDEFS 216090 . 219896) (COMPARE 219898 . 220602) (TYPESOF 220604 . 223905)) (224057 232305 (
FILEPKGCOM 224067 . 228843) (FILEPKGTYPE 228845 . 232303)) (244338 261813 (FINDCALLERS 244348 . 244978
) (EDITCALLERS 244980 . 255697) (EDITFROMFILE 255699 . 261128) (FINDATS 261130 . 261402) (LOOKIN
261404 . 261811)) (261814 263485 (SEPRCASE 261824 . 263483)) (264002 269005 (IMPORTFILE 264012 .
264982) (IMPORTEVAL 264984 . 265870) (IMPORTFILESCAN 265872 . 266285) (CHECKIMPORTS 266287 . 267543) (
GATHEREXPORTS 267545 . 268413) (\DUMPEXPORTS 268415 . 269003)) (269343 271413 (CLEARFILEPKG 269353 .
271411)))))
(FILEMAP (NIL (18890 20563 (SEARCHPRETTYTYPELST 18900 . 19869) (PRETTYDEFMACROS 19871 . 20307) (
FILEPKGCOMPROPS 20309 . 20561)) (21376 55668 (CLEANUP 21386 . 22776) (COMPILEFILES 22778 . 23054) (
COMPILEFILES0 23056 . 23869) (CONTINUEDIT 23871 . 25248) (MAKEFILE 25250 . 36976) (FILECHANGES 36978
. 39742) (FILEPKG.MERGECHANGES 39744 . 40379) (FILEPKG.CHANGEDFNS 40381 . 40693) (MAKEFILE1 40695 .
44907) (COMPILE-FILE? 44909 . 46496) (MAKEFILES 46498 . 48026) (ADDFILE 48028 . 50571) (ADDFILE0 50573
. 54697) (LISTFILES 54699 . 55666)) (56340 90139 (FILEPKGCHANGES 56350 . 57529) (GETFILEPKGTYPE 57531
. 60481) (MARKASCHANGED 60483 . 62114) (FILECOMS 62116 . 62500) (WHEREIS 62502 . 64244) (
SMASHFILECOMS 64246 . 64474) (FILEFNSLST 64476 . 64642) (FILECOMSLST 64644 . 65130) (UPDATEFILES 65132
. 69630) (INFILECOMS? 69632 . 71475) (INFILECOMTAIL 71477 . 72595) (INFILECOMS 72597 . 72758) (
INFILECOM 72760 . 82778) (INFILECOMSVALS 82780 . 83087) (INFILECOMSVAL 83089 . 84097) (INFILECOMSPROP
84099 . 84892) (IFCPROPS 84894 . 85974) (IFCEXPRTYPE 85976 . 86592) (IFCPROPSCAN 86594 . 87555) (
IFCDECLARE 87557 . 88816) (INFILEPAIRS 88818 . 89117) (INFILECOMSMACRO 89119 . 90137)) (90174 120860 (
FILES? 90184 . 92295) (FILES?1 92297 . 92999) (FILES?PRINTLST 93001 . 93783) (ADDTOFILES? 93785 .
104328) (ADDTOFILE 104330 . 105246) (WHATIS 105248 . 107224) (ADDTOCOMS 107226 . 108764) (ADDTOCOM
108766 . 115253) (ADDTOCOM1 115255 . 116426) (ADDNEWCOM 116428 . 117478) (MAKENEWCOM 117480 . 119327)
(DEFAULTMAKENEWCOM 119329 . 120858)) (120930 123747 (MERGEINSERT 120940 . 123283) (MERGEINSERT1 123285
. 123745)) (123901 125262 (ADDTOFILEKEYLST 123911 . 125260)) (125379 136180 (DELFROMFILES 125389 .
126219) (DELFROMCOMS 126221 . 127900) (DELFROMCOM 127902 . 133667) (DELFROMCOM1 133669 . 134468) (
REMOVEITEM 134470 . 135346) (MOVETOFILE 135348 . 136178)) (136394 138765 (SAVEPUT 136404 . 138763)) (
138890 147133 (UNMARKASCHANGED 138900 . 140384) (PREEDITFN 140386 . 142867) (POSTEDITPROPS 142869 .
145163) (POSTEDITALISTS 145165 . 147131)) (147278 166748 (ALISTS.GETDEF 147288 . 147667) (
ALISTS.WHENCHANGED 147669 . 148315) (CLEARCLISPARRAY 148317 . 149495) (EXPRESSIONS.WHENCHANGED 149497
. 149875) (MAKEALISTCOMS 149877 . 150892) (MAKEFILESCOMS 150894 . 152224) (MAKELISPXMACROSCOMS 152226
. 154244) (MAKEPROPSCOMS 154246 . 154872) (MAKEUSERMACROSCOMS 154874 . 156691) (PROPS.WHENCHANGED
156693 . 157314) (FILEGETDEF.LISPXMACROS 157316 . 158615) (FILEGETDEF.ALISTS 158617 . 159208) (
FILEGETDEF.RECORDS 159210 . 160137) (FILEGETDEF.PROPS 160139 . 160934) (FILEGETDEF.MACROS 160936 .
161818) (FILEGETDEF.VARS 161820 . 162423) (FILEGETDEF.FNS 162425 . 163665) (FILEPKGCOMS.PUTDEF 163667
. 165609) (FILES.PUTDEF 165611 . 166479) (VARS.PUTDEF 166481 . 166624) (FILES.WHENCHANGED 166626 .
166746)) (168770 176001 (RENAME 168780 . 170225) (CHANGECALLERS 170227 . 175999)) (176002 223911 (
SHOWDEF 176012 . 177209) (COPYDEF 177211 . 179959) (GETDEF 179961 . 182504) (GETDEFCOM 182506 . 183472
) (GETDEFCOM0 183474 . 184667) (GETDEFCURRENT 184669 . 190981) (GETDEFERR 190983 . 192253) (
GETDEFFROMFILE 192255 . 196484) (GETDEFSAVED 196486 . 197574) (PUTDEF 197576 . 198283) (EDITDEF 198285
. 199268) (DEFAULT.EDITDEF 199270 . 202108) (EDITDEF.FILES 202110 . 202315) (LOADDEF 202317 . 202493)
(DWIMDEF 202495 . 203349) (DELDEF 203351 . 206245) (DELFROMLIST 206247 . 206751) (HASDEF 206753 .
212990) (GETFILEDEF 212992 . 213504) (SAVEDEF 213506 . 215194) (UNSAVEDEF 215196 . 216092) (
COMPAREDEFS 216094 . 219900) (COMPARE 219902 . 220606) (TYPESOF 220608 . 223909)) (224061 232309 (
FILEPKGCOM 224071 . 228847) (FILEPKGTYPE 228849 . 232307)) (244342 262031 (FINDCALLERS 244352 . 244982
) (EDITCALLERS 244984 . 255915) (EDITFROMFILE 255917 . 261346) (FINDATS 261348 . 261620) (LOOKIN
261622 . 262029)) (262032 263703 (SEPRCASE 262042 . 263701)) (264220 269223 (IMPORTFILE 264230 .
265200) (IMPORTEVAL 265202 . 266088) (IMPORTFILESCAN 266090 . 266503) (CHECKIMPORTS 266505 . 267761) (
GATHEREXPORTS 267763 . 268631) (\DUMPEXPORTS 268633 . 269221)) (269561 271631 (CLEARFILEPKG 269571 .
271629)))))
STOP

Binary file not shown.

View File

@@ -1,13 +1,10 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "26-Aug-2024 22:11:48" {DSK}<home>matt>Interlisp>medley>sources>MEDLEYDIR.;4 11113
(FILECREATED "15-May-2025 00:18:25" {DSK}<home>frank>il>qmedley>sources>MEDLEYDIR.;2 11450
:EDIT-BY "mth"
:CHANGES-TO (VARS MEDLEY-INIT-VARS)
:CHANGES-TO (VARS MEDLEYDIRCOMS MEDLEY-INIT-VARS)
(FNS SET-SYSOUT-COMMIT)
:PREVIOUS-DATE " 8-Jul-2024 22:49:43" {DSK}<home>matt>Interlisp>medley>sources>MEDLEYDIR.;3)
:PREVIOUS-DATE "26-Aug-2024 22:11:48" {DSK}<home>frank>il>qmedley>sources>MEDLEYDIR.;1)
(PRETTYCOMPRINT MEDLEYDIRCOMS)
@@ -193,8 +190,12 @@
(IRM.HOST&DIR (MEDLEYDIR '"docs/dinfo"))
(IRM.DINFOGRAPH)
(DIRECTORIES (APPEND LISPUSERSDIRECTORIES LISPSOURCEDIRECTORIES))
[LOGINHOST/DIR (DIRECTORYNAME (OR (UNIX-GETENV "LOGINDIR")
(UNIX-GETENV "HOME"]
(LOGINHOST/DIR (LET [(LHD (DIRECTORYNAME (OR (UNIX-GETENV "LOGINDIR")
(UNIX-GETENV "HOME"]
(AND (GETD 'PSEUDOHOSTS)
(TARGETHOST 'LI)
(PSEUDOHOST 'LI LHD))
LHD))
[USERGREETFILES (LIST (CONS LOGINHOST/DIR '("INIT" COM))
(CONS LOGINHOST/DIR '("INIT"]
(DISPLAYFONTDIRECTORIES (MEDLEYDIR '("fonts/displayfonts" "fonts/altofonts" "fonts/adobe"
@@ -206,8 +207,12 @@
NIL NIL T))
(UNICODEDIRECTORIES (MEDLEYDIR '("unicode/xerox")
NIL NIL T))
(LOGINHOST/DIR (DIRECTORYNAME (OR (UNIX-GETENV "LOGINDIR")
(UNIX-GETENV "HOME")))
(LOGINHOST/DIR (LET [(LHD (DIRECTORYNAME (OR (UNIX-GETENV "LOGINDIR")
(UNIX-GETENV "HOME"]
(AND (GETD 'PSEUDOHOSTS)
(TARGETHOST 'LI)
(PSEUDOHOST 'LI LHD))
LHD)
RESET)
(USERGREETFILES [LIST (CONS LOGINHOST/DIR '("INIT" COM))
(CONS LOGINHOST/DIR '("INIT"]
@@ -221,6 +226,6 @@
(ADDTOVAR GLOBALVARS MEDLEYDIR MEDLEY-INIT-VARS \SAVE.MEDLEYDIR DIRECTORIES SYSOUTCOMMITS)
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (1749 8823 (MEDLEY-INIT-VARS 1759 . 5237) (MEDLEYDIR 5239 . 7623) (MEDLEYSUBSTDIR 7625
. 8603) (SET-SYSOUT-COMMIT 8605 . 8821)))))
(FILEMAP (NIL (1661 8735 (MEDLEY-INIT-VARS 1671 . 5149) (MEDLEYDIR 5151 . 7535) (MEDLEYSUBSTDIR 7537
. 8515) (SET-SYSOUT-COMMIT 8517 . 8733)))))
STOP

Binary file not shown.