Update loadup and medley scripts to use "tag" instead of "branch"; add ability to completely delete tagged loadups rather than just thin them (#2249)
* WIP in changing loadups to tagged nomeclature rather that branch and ability to delete tagged branches as well as thin them. * In loadup and medley scripts, changed the --branch (-br) command line argument to --tag (-tg). Correspondingly changed the MEDLEYDIR/loadups/branches directory to be MEDLEYDIR/loadups/tagged. Separately, added a + parameter to the --thinw and --thinl command line arguments which causes ALL files to be deleted, not just the versioned files. Added a --thin command line argument that is equivalent to --thinw followed by --thinl. Updated the man page to reflect all these changes. * Updated medley script man page to reflect the new tag nomenclature instead of branch nomenclature. * Fix issue#2063 - typo in medley man page * 1) In loadup script made --help (-h) be a synomym of --man (-z). 2) In both loadup and medley scripts added an optional parameter (+) to the --man (z) command line argument that when specified will display the man page without paging - i.e., sets the pager to cat. * Fix Issue#2251 LOADUPSDIRECTORIES settings by the MEDLEYDIR fn now takes into account tagged loadups
This commit is contained in:
@@ -20,9 +20,10 @@ invocation of medley.</p>
|
|||||||
<dd>
|
<dd>
|
||||||
<p>Prints out a brief summary of the flags and arguments to medley.</p>
|
<p>Prints out a brief summary of the flags and arguments to medley.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>-z, --man</dt>
|
<dt>-z [+], --man [+]</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>Show the man page for medley</p>
|
<p>Show the man page for medley. If the <strong>+</strong> parameter is
|
||||||
|
specified, then no pager is used when displaying the man page.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>-c [<em>FILE</em> | -], --config [<em>FILE</em> | -]</dt>
|
<dt>-c [<em>FILE</em> | -], --config [<em>FILE</em> | -]</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@@ -101,7 +102,7 @@ virtual display.</p>
|
|||||||
<dt>-g [<em>WxH</em> | -], --geometry [<em>WxH</em> | -]</dt>
|
<dt>-g [<em>WxH</em> | -], --geometry [<em>WxH</em> | -]</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>Sets the size of the X Window (or VNC window) that Medley runs in to
|
<p>Sets the size of the X Window (or VNC window) that Medley runs in to
|
||||||
be Width x Height. (Full X Windows geomtery specification with +X+Y is
|
be Width x Height. (Full X Windows geometry specification with +X+Y is
|
||||||
not currently supported).</p>
|
not currently supported).</p>
|
||||||
<p>If a value of “-” is given, geometry is set to the default value.</p>
|
<p>If a value of “-” is given, geometry is set to the default value.</p>
|
||||||
<p>If --geometry is not specified but --screensize is, then the window
|
<p>If --geometry is not specified but --screensize is, then the window
|
||||||
@@ -293,15 +294,15 @@ that detects Xvnc server failures. Setting this flag notifies Medley
|
|||||||
that very short Medley sessions are possible and the Xvnc error
|
that very short Medley sessions are possible and the Xvnc error
|
||||||
detection needs to be adjusted accordingly.</p>
|
detection needs to be adjusted accordingly.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>-br [<em>BRANCH</em> | -], --branch [<em>BRANCH</em> | -]</dt>
|
<dt>-tg [<em>TAG</em> | -], --tag [<em>TAG</em> | -]</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>By default, sysout files are loaded from the MEDLEYDIR/loadups
|
<p>By default, sysout files are loaded from the MEDLEYDIR/loadups
|
||||||
directory. If “--branch <em>BRANCH</em>” is specified, then by default
|
directory. If “--tag <em>TAG</em>” is specified, then by default sysout
|
||||||
sysout files are loaded from the MEDLEYDIR/loadups/branches/BRANCH
|
files are loaded from the MEDLEYDIR/loadups/tagged/TAG directory. The
|
||||||
directory. The sysouts in these directories are created using a loadups
|
sysouts in these directories are created using a loadups script with the
|
||||||
script with the --branch flag set. See the loadup man page. If
|
--tag flag set. See the loadup man page. If <em>TAG</em> is “-”, then
|
||||||
<em>BRANCH</em> is “-”, then the name of the active git branch for
|
the name of the active git branch for MEDLEYDIR (if any) is used as
|
||||||
MEDLEYDIR (if any) is used as <em>BRANCH</em>.</p>
|
<em>TAG</em>.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<h2>Other Options</h2>
|
<h2>Other Options</h2>
|
||||||
|
|||||||
@@ -45,8 +45,10 @@ hence MEDLEYDIR is computed on each invocation of medley.
|
|||||||
-h, --help
|
-h, --help
|
||||||
Prints out a brief summary of the flags and arguments to medley.
|
Prints out a brief summary of the flags and arguments to medley.
|
||||||
.TP
|
.TP
|
||||||
-z, --man
|
-z [+], --man [+]
|
||||||
Show the man page for medley
|
Show the man page for medley.
|
||||||
|
If the \f[B]+\f[R] parameter is specified, then no pager is used when
|
||||||
|
displaying the man page.
|
||||||
.TP
|
.TP
|
||||||
-c [\f[I]FILE\f[R] | -], --config [\f[I]FILE\f[R] | -]
|
-c [\f[I]FILE\f[R] | -], --config [\f[I]FILE\f[R] | -]
|
||||||
Use \f[I]FILE\f[R] as the config file for this run of Medley.
|
Use \f[I]FILE\f[R] as the config file for this run of Medley.
|
||||||
@@ -151,7 +153,7 @@ virtual display.
|
|||||||
-g [\f[I]WxH\f[R] | -], --geometry [\f[I]WxH\f[R] | -]
|
-g [\f[I]WxH\f[R] | -], --geometry [\f[I]WxH\f[R] | -]
|
||||||
Sets the size of the X Window (or VNC window) that Medley runs in to be
|
Sets the size of the X Window (or VNC window) that Medley runs in to be
|
||||||
Width x Height.
|
Width x Height.
|
||||||
(Full X Windows geomtery specification with +X+Y is not currently
|
(Full X Windows geometry specification with +X+Y is not currently
|
||||||
supported).
|
supported).
|
||||||
.RS
|
.RS
|
||||||
.PP
|
.PP
|
||||||
@@ -396,17 +398,16 @@ failures.
|
|||||||
Setting this flag notifies Medley that very short Medley sessions are
|
Setting this flag notifies Medley that very short Medley sessions are
|
||||||
possible and the Xvnc error detection needs to be adjusted accordingly.
|
possible and the Xvnc error detection needs to be adjusted accordingly.
|
||||||
.TP
|
.TP
|
||||||
-br [\f[I]BRANCH\f[R] | -], --branch [\f[I]BRANCH\f[R] | -]
|
-tg [\f[I]TAG\f[R] | -], --tag [\f[I]TAG\f[R] | -]
|
||||||
By default, sysout files are loaded from the MEDLEYDIR/loadups
|
By default, sysout files are loaded from the MEDLEYDIR/loadups
|
||||||
directory.
|
directory.
|
||||||
If \[lq]--branch \f[I]BRANCH\f[R]\[rq] is specified, then by default
|
If \[lq]--tag \f[I]TAG\f[R]\[rq] is specified, then by default sysout
|
||||||
sysout files are loaded from the MEDLEYDIR/loadups/branches/BRANCH
|
files are loaded from the MEDLEYDIR/loadups/tagged/TAG directory.
|
||||||
directory.
|
|
||||||
The sysouts in these directories are created using a loadups script with
|
The sysouts in these directories are created using a loadups script with
|
||||||
the --branch flag set.
|
the --tag flag set.
|
||||||
See the loadup man page.
|
See the loadup man page.
|
||||||
If \f[I]BRANCH\f[R] is \[lq]-\[rq], then the name of the active git
|
If \f[I]TAG\f[R] is \[lq]-\[rq], then the name of the active git branch
|
||||||
branch for MEDLEYDIR (if any) is used as \f[I]BRANCH\f[R].
|
for MEDLEYDIR (if any) is used as \f[I]TAG\f[R].
|
||||||
.SS Other Options
|
.SS Other Options
|
||||||
.PP
|
.PP
|
||||||
\
|
\
|
||||||
|
|||||||
Binary file not shown.
@@ -38,8 +38,9 @@ Flags
|
|||||||
-h, \-\-help
|
-h, \-\-help
|
||||||
: Prints out a brief summary of the flags and arguments to medley.
|
: Prints out a brief summary of the flags and arguments to medley.
|
||||||
|
|
||||||
-z, \-\-man
|
-z [+], \-\-man [+]
|
||||||
: Show the man page for medley
|
: Show the man page for medley. If the **+** parameter is specified, then no pager is used when
|
||||||
|
displaying the man page.
|
||||||
|
|
||||||
-c [*FILE* | -], \-\-config [*FILE* | -]
|
-c [*FILE* | -], \-\-config [*FILE* | -]
|
||||||
: Use *FILE* as the config file for this run of Medley. See information on *CONFIG FILE* below.
|
: Use *FILE* as the config file for this run of Medley. See information on *CONFIG FILE* below.
|
||||||
@@ -106,7 +107,7 @@ than the window, there will be no way to pan to the non-visible parts of the vir
|
|||||||
|
|
||||||
-g [*WxH* | -], \-\-geometry [*WxH* | -]
|
-g [*WxH* | -], \-\-geometry [*WxH* | -]
|
||||||
: Sets the size of the X Window (or VNC window) that Medley runs in to be Width x Height. (Full X Windows
|
: Sets the size of the X Window (or VNC window) that Medley runs in to be Width x Height. (Full X Windows
|
||||||
geomtery specification with +X+Y is not currently supported).
|
geometry specification with +X+Y is not currently supported).
|
||||||
|
|
||||||
If a value of "-" is given, geometry is set to the default value.
|
If a value of "-" is given, geometry is set to the default value.
|
||||||
|
|
||||||
@@ -263,14 +264,13 @@ specified in the Medley file system, not the host Windows file system.
|
|||||||
will run for a very short time (< a couple of seconds). This can cause issues with medley code that detects Xvnc server failures.
|
will run for a very short time (< a couple of seconds). This can cause issues with medley code that detects Xvnc server failures.
|
||||||
Setting this flag notifies Medley that very short Medley sessions are possible and the Xvnc error detection needs to be adjusted accordingly.
|
Setting this flag notifies Medley that very short Medley sessions are possible and the Xvnc error detection needs to be adjusted accordingly.
|
||||||
|
|
||||||
-br [*BRANCH* | -], \-\-branch [*BRANCH* | -]
|
-tg [*TAG* | -], \-\-tag [*TAG* | -]
|
||||||
: By default, sysout files are loaded from the MEDLEYDIR/loadups directory.
|
: By default, sysout files are loaded from the MEDLEYDIR/loadups directory.
|
||||||
If "\-\-branch *BRANCH*" is specified, then by default sysout files are loaded from the
|
If "\-\-tag *TAG*" is specified, then by default sysout files are loaded from the
|
||||||
MEDLEYDIR/loadups/branches/BRANCH directory. The sysouts in these directories are created using
|
MEDLEYDIR/loadups/tagged/TAG directory. The sysouts in these directories are created using
|
||||||
a loadups script with the \-\-branch flag set. See the loadup man page.
|
a loadups script with the \-\-tag flag set. See the loadup man page.
|
||||||
If *BRANCH* is "-", then the name of the active git branch for MEDLEYDIR (if any) is used as
|
If *TAG* is "-", then the name of the active git branch for MEDLEYDIR (if any) is used as
|
||||||
*BRANCH*.
|
*TAG*.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Other Options
|
Other Options
|
||||||
|
|||||||
@@ -130,8 +130,10 @@ But Medley can be installed in multiple places on any given machine and
|
|||||||
hence MEDLEYDIR is computed on each invocation of loadup.
|
hence MEDLEYDIR is computed on each invocation of loadup.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.TP
|
.TP
|
||||||
\f[B]-z, --man, -man\f[R]
|
\f[B]-z [+], --man [+], -man [+], -h [+], \[en]help [+]\f[R]
|
||||||
Print this manual page on the screen.
|
Print this manual page on the screen.
|
||||||
|
If the \f[B]+\f[R] parameter is specified, then no pager is used when
|
||||||
|
displaying the man page.
|
||||||
.TP
|
.TP
|
||||||
\f[B]-t STAGE, --target STAGE, -target STAGE\f[R]
|
\f[B]-t STAGE, --target STAGE, -target STAGE\f[R]
|
||||||
Run the sequential loadup procedure until the STAGE is complete,
|
Run the sequential loadup procedure until the STAGE is complete,
|
||||||
@@ -266,31 +268,47 @@ simultaneously.
|
|||||||
If this flag is not set and an active lock is encountered, the user will
|
If this flag is not set and an active lock is encountered, the user will
|
||||||
be asked to choose whether to override or exit.
|
be asked to choose whether to override or exit.
|
||||||
.TP
|
.TP
|
||||||
\f[B]-br [ BRANCH | -], --branch [ BRANCH | - ]\f[R]
|
\f[B]-tg [ TAG | -], --tag [ TAG | - ]\f[R]
|
||||||
By default the sysouts and other files produced by loadup are placed at
|
By default the sysouts and other files produced by loadup are placed at
|
||||||
the top level of the <MEDLEYDIR>/loadups directory.
|
the top level of the <MEDLEYDIR>/loadups directory.
|
||||||
If this flag is specified, then the sysout and other output files are
|
If this flag is specified, then the sysout and other output files are
|
||||||
placed in the directory <MEDLEYDIR>/loadups/branches/BRANCH.
|
placed in the directory <MEDLEYDIR>/loadups/tagged/TAG.
|
||||||
If BRANCH is \[lq]-\[rq] or not specified at all, then BRANCH is the
|
If TAG is \[lq]-\[rq] or not specified at all, then TAG is the name of
|
||||||
name of the currently active git branch of <MEDLEYDIR>, except if git is
|
the currently active git branch of <MEDLEYDIR>, except if git is not
|
||||||
not installled on the current system or if <MEDLEYDIR> is not a git
|
installled on the current system or if <MEDLEYDIR> is not a git
|
||||||
directory, in which case then this flag is ignored.
|
directory, in which case then this flag is ignored.
|
||||||
BRANCH can contain alphanumerics, dashes, underscores,and periods.
|
TAG can contain alphanumerics, dashes, underscores,and periods.
|
||||||
Any other character is replaced by an underscore.
|
Any other character is replaced by an underscore.
|
||||||
The medley script has a corresponding --branch argument to load these
|
The medley script has a corresponding --tag (-tg) argument to load these
|
||||||
sysout files.
|
sysout files.
|
||||||
.TP
|
.TP
|
||||||
\f[B]-nc, --nocopy, -nocopy\f[R]
|
\f[B]-nc, --nocopy, -nocopy\f[R]
|
||||||
Run the specified loadups, but do not copy results into loadups
|
Run the specified loadups, but do not copy results into loadups
|
||||||
directory.
|
directory.
|
||||||
.TP
|
.TP
|
||||||
\f[B]-tw, --thinw, -thinw\f[R]
|
\f[B]-tw [+], --thinw [+], -thinw [+]\f[R]
|
||||||
Before running loadups (if any), thin the working directory by deleting
|
Before running loadups (if any), thin the working directory by deleting
|
||||||
all versioned (\f[I].\[ti][0-9]\f[R]\[ti]) files.
|
all versioned (\f[I].\[ti][0-9]\f[R]\[ti]) files therein.
|
||||||
|
If the \f[B]+\f[R] parameter is used, then instead of deleting just the
|
||||||
|
versioned files, the working directory (and all files and subdirectories
|
||||||
|
it contains) is deleted.
|
||||||
.TP
|
.TP
|
||||||
\f[B]-tl, --thinl, -thinl\f[R]
|
\f[B]-tl [+], --thinl [+], -thinl [+]\f[R]
|
||||||
Before running loadups (if any), thin the loadups directory by deleting
|
Before running loadups (if any), thin the loadups directory by deleting
|
||||||
all versioned (\f[I].\[ti][0-9]\f[R]\[ti]) files.
|
all versioned (\f[I].\[ti][0-9]\f[R]\[ti]) files except for those
|
||||||
|
contained in the working directory.
|
||||||
|
If the \f[B]+\f[R] parameter is used, then instead of deleting just the
|
||||||
|
versioned files, all files and subdirectories are deleted except for
|
||||||
|
those contained in the working directory.
|
||||||
|
If \f[B]+\f[R] is used and there is no working directory and
|
||||||
|
\f[I]\[en]tag TAG\f[R] is also specified, then the tagged loadups
|
||||||
|
directory (<MEDLEYDIR>/loadups/tagged/TAG) is also deleted.
|
||||||
|
.TP
|
||||||
|
\f[B]-th [+], --thin [+], -thin [+]\f[R]
|
||||||
|
Equivalent to specifying both -tw [+] and -tl [+].
|
||||||
|
If \f[I]\[en]tag TAG\f[R] is also specified and the \f[B]+\f[R]
|
||||||
|
parameter is used here, then the tagged loadups directory
|
||||||
|
(<MEDLEYDIR>/loadups/tagged/TAG) is removed.
|
||||||
.TP
|
.TP
|
||||||
\f[B]-d DIR, --maikodir DIR, -maikodir DIR\f[R]
|
\f[B]-d DIR, --maikodir DIR, -maikodir DIR\f[R]
|
||||||
Use DIR as the directory from which to execute lde (Miko) when running
|
Use DIR as the directory from which to execute lde (Miko) when running
|
||||||
|
|||||||
Binary file not shown.
@@ -61,8 +61,9 @@ hence MEDLEYDIR is computed on each invocation of loadup.
|
|||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
=======
|
=======
|
||||||
**-z, \-\-man, \-man**
|
**-z [+], \-\-man [+], \-man [+], -h [+], --help [+]**
|
||||||
: Print this manual page on the screen.
|
: Print this manual page on the screen. If the **+** parameter is specified, then no pager is used when
|
||||||
|
displaying the man page.
|
||||||
|
|
||||||
**-t STAGE, \-\-target STAGE, -target STAGE**
|
**-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.
|
: 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.
|
||||||
@@ -124,25 +125,37 @@ OPTIONS
|
|||||||
**-ov, \-\-override, -override**
|
**-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.
|
: 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.
|
||||||
|
|
||||||
**-br [ BRANCH | -], \-\-branch [ BRANCH | - ]**
|
**-tg [ TAG | -], \-\-tag [ TAG | - ]**
|
||||||
: By default the sysouts and other files produced by loadup are placed at the top level of
|
: By default the sysouts and other files produced by loadup are placed at the top level of
|
||||||
the \<MEDLEYDIR>/loadups directory. If this flag is specified, then the sysout and other
|
the \<MEDLEYDIR>/loadups directory. If this flag is specified, then the sysout and other
|
||||||
output files are placed in the directory \<MEDLEYDIR>/loadups/branches/BRANCH.
|
output files are placed in the directory \<MEDLEYDIR>/loadups/tagged/TAG.
|
||||||
If BRANCH is "-" or not specified at all, then BRANCH is the name of the currently active
|
If TAG is "-" or not specified at all, then TAG is the name of the currently active
|
||||||
git branch of \<MEDLEYDIR>, except if git is not installled on the current system
|
git branch of \<MEDLEYDIR>, except if git is not installled on the current system
|
||||||
or if \<MEDLEYDIR> is not a git directory, in which case then this flag is ignored.
|
or if \<MEDLEYDIR> is not a git directory, in which case then this flag is ignored.
|
||||||
BRANCH can contain alphanumerics, dashes, underscores,and periods.
|
TAG can contain alphanumerics, dashes, underscores,and periods.
|
||||||
Any other character is replaced by an underscore.
|
Any other character is replaced by an underscore.
|
||||||
The medley script has a corresponding \-\-branch argument to load these sysout files.
|
The medley script has a corresponding \-\-tag (-tg) argument to load these sysout files.
|
||||||
|
|
||||||
**-nc, \-\-nocopy, -nocopy**
|
**-nc, \-\-nocopy, -nocopy**
|
||||||
: Run the specified loadups, but do not copy results into loadups directory.
|
: Run the specified loadups, but do not copy results into loadups directory.
|
||||||
|
|
||||||
**-tw, \-\-thinw, -thinw**
|
**-tw [+], \-\-thinw [+], -thinw [+]**
|
||||||
: Before running loadups (if any), thin the working directory by deleting all versioned (*.~[0-9]*~) files.
|
: Before running loadups (if any), thin the working directory by deleting all versioned (*.~[0-9]*~)
|
||||||
|
files therein. If the **+** parameter is used, then instead of deleting just the versioned files, the
|
||||||
|
working directory (and all files and subdirectories it contains) is deleted.
|
||||||
|
|
||||||
**-tl, \-\-thinl, -thinl**
|
**-tl [+], \-\-thinl [+], -thinl [+]**
|
||||||
: Before running loadups (if any), thin the loadups directory by deleting all versioned (*.~[0-9]*~) files.
|
: Before running loadups (if any), thin the loadups directory by deleting all versioned (*.~[0-9]*~)
|
||||||
|
files except for those contained in the working directory.
|
||||||
|
If the **+** parameter is used, then instead of deleting just the versioned files, all files and
|
||||||
|
subdirectories are deleted except for those contained in the working directory. If **+** is used and
|
||||||
|
there is no working directory and *--tag TAG* is also specified,
|
||||||
|
then the tagged loadups directory (\<MEDLEYDIR>/loadups/tagged/TAG) is also deleted.
|
||||||
|
|
||||||
|
**-th [+], \-\-thin [+], -thin [+]**
|
||||||
|
: Equivalent to specifying both -tw [+] and -tl [+]. If *--tag TAG* is also specified and
|
||||||
|
the **+** parameter is used here, then the tagged loadups directory (\<MEDLEYDIR>/loadups/tagged/TAG)
|
||||||
|
is removed.
|
||||||
|
|
||||||
**-d DIR, \-\-maikodir DIR, -maikodir DIR**
|
**-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.
|
: 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.
|
||||||
|
|||||||
@@ -99,9 +99,11 @@ installed in multiple places on any given machine and hence MEDLEYDIR is
|
|||||||
computed on each invocation of loadup.</p>
|
computed on each invocation of loadup.</p>
|
||||||
<h1>OPTIONS</h1>
|
<h1>OPTIONS</h1>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><strong>-z, --man, -man</strong></dt>
|
<dt><strong>-z [+], --man [+], -man [+], -h [+], –help [+]</strong></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>Print this manual page on the screen.</p>
|
<p>Print this manual page on the screen. If the <strong>+</strong>
|
||||||
|
parameter is specified, then no pager is used when displaying the man
|
||||||
|
page.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><strong>-t STAGE, --target STAGE, -target STAGE</strong></dt>
|
<dt><strong>-t STAGE, --target STAGE, -target STAGE</strong></dt>
|
||||||
<dd>
|
<dd>
|
||||||
@@ -208,34 +210,51 @@ 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
|
encountered, the user will be asked to choose whether to override or
|
||||||
exit.</p>
|
exit.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><strong>-br [ BRANCH | -], --branch [ BRANCH | - ]</strong></dt>
|
<dt><strong>-tg [ TAG | -], --tag [ TAG | - ]</strong></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>By default the sysouts and other files produced by loadup are placed
|
<p>By default the sysouts and other files produced by loadup are placed
|
||||||
at the top level of the <MEDLEYDIR>/loadups directory. If this
|
at the top level of the <MEDLEYDIR>/loadups directory. If this
|
||||||
flag is specified, then the sysout and other output files are placed in
|
flag is specified, then the sysout and other output files are placed in
|
||||||
the directory <MEDLEYDIR>/loadups/branches/BRANCH. If BRANCH is
|
the directory <MEDLEYDIR>/loadups/tagged/TAG. If TAG is “-” or not
|
||||||
“-” or not specified at all, then BRANCH is the name of the currently
|
specified at all, then TAG is the name of the currently active git
|
||||||
active git branch of <MEDLEYDIR>, except if git is not installled
|
branch of <MEDLEYDIR>, except if git is not installled on the
|
||||||
on the current system or if <MEDLEYDIR> is not a git directory, in
|
current system or if <MEDLEYDIR> is not a git directory, in which
|
||||||
which case then this flag is ignored. BRANCH can contain alphanumerics,
|
case then this flag is ignored. TAG can contain alphanumerics, dashes,
|
||||||
dashes, underscores,and periods. Any other character is replaced by an
|
underscores,and periods. Any other character is replaced by an
|
||||||
underscore. The medley script has a corresponding --branch argument to
|
underscore. The medley script has a corresponding --tag (-tg) argument
|
||||||
load these sysout files.</p>
|
to load these sysout files.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><strong>-nc, --nocopy, -nocopy</strong></dt>
|
<dt><strong>-nc, --nocopy, -nocopy</strong></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>Run the specified loadups, but do not copy results into loadups
|
<p>Run the specified loadups, but do not copy results into loadups
|
||||||
directory.</p>
|
directory.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><strong>-tw, --thinw, -thinw</strong></dt>
|
<dt><strong>-tw [+], --thinw [+], -thinw [+]</strong></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>Before running loadups (if any), thin the working directory by
|
<p>Before running loadups (if any), thin the working directory by
|
||||||
deleting all versioned (<em>.~[0-9]</em>~) files.</p>
|
deleting all versioned (<em>.~[0-9]</em>~) files therein. If the
|
||||||
|
<strong>+</strong> parameter is used, then instead of deleting just the
|
||||||
|
versioned files, the working directory (and all files and subdirectories
|
||||||
|
it contains) is deleted.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><strong>-tl, --thinl, -thinl</strong></dt>
|
<dt><strong>-tl [+], --thinl [+], -thinl [+]</strong></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>Before running loadups (if any), thin the loadups directory by
|
<p>Before running loadups (if any), thin the loadups directory by
|
||||||
deleting all versioned (<em>.~[0-9]</em>~) files.</p>
|
deleting all versioned (<em>.~[0-9]</em>~) files except for those
|
||||||
|
contained in the working directory. If the <strong>+</strong> parameter
|
||||||
|
is used, then instead of deleting just the versioned files, all files
|
||||||
|
and subdirectories are deleted except for those contained in the working
|
||||||
|
directory. If <strong>+</strong> is used and there is no working
|
||||||
|
directory and <em>–tag TAG</em> is also specified, then the tagged
|
||||||
|
loadups directory (<MEDLEYDIR>/loadups/tagged/TAG) is also
|
||||||
|
deleted.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><strong>-th [+], --thin [+], -thin [+]</strong></dt>
|
||||||
|
<dd>
|
||||||
|
<p>Equivalent to specifying both -tw [+] and -tl [+]. If <em>–tag
|
||||||
|
TAG</em> is also specified and the <strong>+</strong> parameter is used
|
||||||
|
here, then the tagged loadups directory
|
||||||
|
(<MEDLEYDIR>/loadups/tagged/TAG) is removed.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><strong>-d DIR, --maikodir DIR, -maikodir DIR</strong></dt>
|
<dt><strong>-d DIR, --maikodir DIR, -maikodir DIR</strong></dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|||||||
@@ -14,12 +14,13 @@ main() {
|
|||||||
nocopy=false
|
nocopy=false
|
||||||
thinw=false
|
thinw=false
|
||||||
thinl=false
|
thinl=false
|
||||||
|
thinall=false
|
||||||
override_lock=false
|
override_lock=false
|
||||||
ignore_lock=false
|
ignore_lock=false
|
||||||
export LOADUP_USE_VNC="-"
|
export LOADUP_USE_VNC="-"
|
||||||
man_flg=false
|
man_flg=false
|
||||||
use_branch=""
|
use_tag=""
|
||||||
branch_requested=false
|
tag_requested=false
|
||||||
|
|
||||||
while [ "$#" -ne 0 ];
|
while [ "$#" -ne 0 ];
|
||||||
do
|
do
|
||||||
@@ -123,18 +124,18 @@ main() {
|
|||||||
end=1
|
end=1
|
||||||
end_s=init
|
end_s=init
|
||||||
;;
|
;;
|
||||||
-br | -branch | --branch)
|
-tg | -tag | --tag)
|
||||||
branch_requested=true
|
tag_requested=true
|
||||||
if [ "$2" = "-" ]
|
if [ "$2" = "-" ]
|
||||||
then
|
then
|
||||||
use_branch="-"
|
use_tag="-"
|
||||||
shift
|
shift
|
||||||
else
|
else
|
||||||
if check_for_no_arg "$2"
|
if check_for_no_arg "$2"
|
||||||
then
|
then
|
||||||
use_branch="-"
|
use_tag="-"
|
||||||
else
|
else
|
||||||
use_branch="$2"
|
use_tag="$2"
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -142,11 +143,29 @@ main() {
|
|||||||
-nc | -nocopy | --nocopy)
|
-nc | -nocopy | --nocopy)
|
||||||
nocopy=true
|
nocopy=true
|
||||||
;;
|
;;
|
||||||
|
-th | -thin | --thin)
|
||||||
|
thinall=true
|
||||||
|
if [ "$2" = "+" ]
|
||||||
|
then
|
||||||
|
thinall="+"
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
;;
|
||||||
-tw | -thinw | --thinw)
|
-tw | -thinw | --thinw)
|
||||||
thinw=true
|
thinw=true
|
||||||
|
if [ "$2" = "+" ]
|
||||||
|
then
|
||||||
|
thinw="+"
|
||||||
|
shift
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
-tl | -thinl | --thinl)
|
-tl | -thinl | --thinl)
|
||||||
thinl=true
|
thinl=true
|
||||||
|
if [ "$2" = "+" ]
|
||||||
|
then
|
||||||
|
thinl="+"
|
||||||
|
shift
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
-d | -maikodir | --maikodir)
|
-d | -maikodir | --maikodir)
|
||||||
if [ -n "$2" ]
|
if [ -n "$2" ]
|
||||||
@@ -178,13 +197,15 @@ main() {
|
|||||||
# internal
|
# internal
|
||||||
noendmsg=true
|
noendmsg=true
|
||||||
;;
|
;;
|
||||||
--forcevnc)
|
-z | -man | --man | -h | -help | --help)
|
||||||
# internal - for testing
|
|
||||||
# WSL only -otherwise warning msg from medley
|
|
||||||
force_vnc="+"
|
|
||||||
;;
|
|
||||||
-z | -man | --man )
|
|
||||||
man_flg=true
|
man_flg=true
|
||||||
|
if [ "$2" = "+" ]
|
||||||
|
then
|
||||||
|
man_no_pager=true
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
man_no_pager=false
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
output_error_msg "Error: unknown flag: $1${EOL}Exiting"
|
output_error_msg "Error: unknown flag: $1${EOL}Exiting"
|
||||||
@@ -206,6 +227,10 @@ main() {
|
|||||||
#
|
#
|
||||||
if [ "${man_flg}" = true ]
|
if [ "${man_flg}" = true ]
|
||||||
then
|
then
|
||||||
|
if [ "${man_no_pager}" = true ]
|
||||||
|
then
|
||||||
|
export PAGER=cat
|
||||||
|
fi
|
||||||
if [ "$(uname)" = "Darwin" ]
|
if [ "$(uname)" = "Darwin" ]
|
||||||
then
|
then
|
||||||
/usr/bin/man "${LOADUP_SOURCEDIR}/man-page/loadup.1.gz"
|
/usr/bin/man "${LOADUP_SOURCEDIR}/man-page/loadup.1.gz"
|
||||||
@@ -223,10 +248,10 @@ main() {
|
|||||||
|
|
||||||
no_loadups=false
|
no_loadups=false
|
||||||
|
|
||||||
# check --branch is used correctly
|
# check --tag is used correctly
|
||||||
if [ "${branch_requested}" = true ] && [ -z "${use_branch}" ]
|
if [ "${tag_requested}" = true ] && [ -z "${use_tag}" ]
|
||||||
then
|
then
|
||||||
output_warn_msg "The --branch (-br) flag was used. But either git is not installed on this system or \"${LOADUP_SOURCEDIR}\" is not a git directory.${EOL}The --branch flag will be ignored"
|
output_warn_msg "The --tag (-tg) flag was used. But either git is not installed on this system or \"${LOADUP_SOURCEDIR}\" is not a git directory.${EOL}The --tg flag will be ignored"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -241,7 +266,7 @@ main() {
|
|||||||
start_sysout=starter.sysout
|
start_sysout=starter.sysout
|
||||||
aux=true
|
aux=true
|
||||||
db=false
|
db=false
|
||||||
if [ "${thinw}" = true ] || [ "${thinl}" = true ]
|
if [ ! "${thinw}" = false ] || [ ! "${thinl}" = false ] || [ ! "${thinall}" = false ]
|
||||||
then
|
then
|
||||||
no_loadups=true
|
no_loadups=true
|
||||||
nocopy=true
|
nocopy=true
|
||||||
@@ -312,13 +337,32 @@ main() {
|
|||||||
|
|
||||||
# if requested, thin the loadups and workdirs by eliminating all versioned (*.~[0-9]*~) files
|
# if requested, thin the loadups and workdirs by eliminating all versioned (*.~[0-9]*~) files
|
||||||
# from these directories
|
# from these directories
|
||||||
if [ "${thinw}" = true ]
|
case "${thinall}" in
|
||||||
|
true) "${LOADUP_SCRIPTDIR}"/thin_loadups.sh lw ;;
|
||||||
|
+) "${LOADUP_SCRIPTDIR}"/thin_loadups.sh lw + ;;
|
||||||
|
*)
|
||||||
|
case "${thinw}" in
|
||||||
|
true) "${LOADUP_SCRIPTDIR}"/thin_loadups.sh w ;;
|
||||||
|
+) "${LOADUP_SCRIPTDIR}"/thin_loadups.sh w + ;;
|
||||||
|
esac
|
||||||
|
case "${thinl}" in
|
||||||
|
true) "${LOADUP_SCRIPTDIR}"/thin_loadups.sh l ;;
|
||||||
|
+) "${LOADUP_SCRIPTDIR}"/thin_loadups.sh l + ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Exit if there's no more work to be done
|
||||||
|
# Otherwise recreate ${LOADUP_WORKDIR} & ${LOADUP_OUTDIR} if they were
|
||||||
|
# deleted during the thin process, if any
|
||||||
|
if [ "${no_loadups}" = true ] && [ "${nocopy}" = true ]
|
||||||
then
|
then
|
||||||
"${LOADUP_SCRIPTDIR}"/thin_loadups.sh w
|
echo "+++++ loadup: SUCCESS +++++"
|
||||||
fi
|
remove_run_lock
|
||||||
if [ "${thinl}" = true ]
|
exit 0
|
||||||
then
|
else
|
||||||
"${LOADUP_SCRIPTDIR}"/thin_loadups.sh l
|
mkdir -p "${LOADUP_OUTDIR}"
|
||||||
|
mkdir -p "${LOADUP_WORKDIR}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# find and place starting sysout
|
# find and place starting sysout
|
||||||
|
|||||||
@@ -28,27 +28,34 @@ git_commit_info "${LOADUP_SOURCEDIR}"
|
|||||||
export LOADUP_COMMIT_ID="${COMMIT_ID}"
|
export LOADUP_COMMIT_ID="${COMMIT_ID}"
|
||||||
export LOADUP_BRANCH="${BRANCH}"
|
export LOADUP_BRANCH="${BRANCH}"
|
||||||
|
|
||||||
if [ "${use_branch}" = "-" ]
|
if [ "${use_tag}" = "-" ]
|
||||||
then
|
then
|
||||||
use_branch="${LOADUP_BRANCH}"
|
use_tag="${LOADUP_BRANCH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
slash_branch=""
|
slash_tag=""
|
||||||
if [ -n "${use_branch}" ]
|
if [ -n "${use_tag}" ]
|
||||||
then
|
then
|
||||||
use_branch="$(printf %s "${use_branch}" | sed "s/[^a-zA-Z0-9_.-]/_/g")"
|
use_tag="$(printf %s "${use_tag}" | sed "s/[^a-zA-Z0-9_.-]/_/g")"
|
||||||
slash_branch="/branches/${use_branch}"
|
slash_tag="/tagged/${use_tag}"
|
||||||
|
# update dir structure for to use tag nomenclature rather than branch nomenclature
|
||||||
|
# but keep compatibilty with branch nomenclature for now
|
||||||
|
if [ -d "${MEDLEYDIR}/loadups/branches" ] && [ ! -h "${MEDLEYDIR}/loadups/branches" ]
|
||||||
|
then
|
||||||
|
mv "${MEDLEYDIR}/loadups/branches" "${MEDLEYDIR}/loadups/tagged"
|
||||||
|
ln -s "${MEDLEYDIR}/loadups/tagged" "${MEDLEYDIR}/loadups/branches"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -z "${LOADUP_OUTDIR}" ]
|
if [ -z "${LOADUP_OUTDIR}" ]
|
||||||
then
|
then
|
||||||
export LOADUP_OUTDIR="${MEDLEYDIR}/loadups${slash_branch}"
|
export LOADUP_OUTDIR="${MEDLEYDIR}/loadups${slash_tag}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "${LOADUP_OUTDIR}" ];
|
if [ ! -d "${LOADUP_OUTDIR}" ]
|
||||||
then
|
then
|
||||||
if [ ! -e "${LOADUP_OUTDIR}" ];
|
if [ ! -e "${LOADUP_OUTDIR}" ]
|
||||||
then
|
then
|
||||||
mkdir -p "${LOADUP_OUTDIR}"
|
mkdir -p "${LOADUP_OUTDIR}"
|
||||||
else
|
else
|
||||||
@@ -159,7 +166,6 @@ loadup_finish () {
|
|||||||
exit ${exit_code}
|
exit ${exit_code}
|
||||||
}
|
}
|
||||||
|
|
||||||
force_vnc="-"
|
|
||||||
run_medley () {
|
run_medley () {
|
||||||
/bin/sh "${MEDLEYDIR}/scripts/medley/medley.command" \
|
/bin/sh "${MEDLEYDIR}/scripts/medley/medley.command" \
|
||||||
--config - \
|
--config - \
|
||||||
|
|||||||
@@ -12,17 +12,48 @@ main() {
|
|||||||
|
|
||||||
if [ "$1" = "w" ] || [ "$1" = "lw" ] || [ "$1" = "wl" ]
|
if [ "$1" = "w" ] || [ "$1" = "lw" ] || [ "$1" = "wl" ]
|
||||||
then
|
then
|
||||||
find "${LOADUP_WORKDIR}" -name "*.~[0-9]*~" -delete
|
if [ ! "$2" = "+" ]
|
||||||
|
then
|
||||||
|
find "${LOADUP_WORKDIR}" -name "*.~[0-9]*~" -delete
|
||||||
|
else
|
||||||
|
rm -rf "${LOADUP_WORKDIR}"/*
|
||||||
|
if istagged "${LOADUP_WORKDIR}"
|
||||||
|
then
|
||||||
|
rm -rf "${LOADUP_WORKDIR}"
|
||||||
|
if istagged "${LOADUP_OUTDIR}" && [ -z "$(ls -a -1 "${LOADUP_OUTDIR}" | tail +3)" ]
|
||||||
|
then
|
||||||
|
rmdir "${LOADUP_OUTDIR}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "$1" = "l" ] || [ "$1" = "lw" ] || [ "$1" = "wl" ]
|
if [ "$1" = "l" ] || [ "$1" = "lw" ] || [ "$1" = "wl" ]
|
||||||
then
|
then
|
||||||
find "${LOADUP_OUTDIR}" -name "*.~[0-9]*~" -delete
|
if [ ! "$2" = "+" ]
|
||||||
|
then
|
||||||
|
find "${LOADUP_OUTDIR}" -name "$(basename "${LOADUP_WORKDIR}")" -prune \
|
||||||
|
-o -name "*.~[0-9]*~" -exec rm -f {} \;
|
||||||
|
else
|
||||||
|
find "${LOADUP_OUTDIR}" \( -name "$(basename "${LOADUP_WORKDIR}")" -prune \) \
|
||||||
|
-o -path "${LOADUP_OUTDIR}" \
|
||||||
|
-o -exec rm -rf {} \; 2>&1 >/dev/null \
|
||||||
|
| grep -v "No such file"
|
||||||
|
if istagged "${LOADUP_OUTDIR}" && [ ! -e "${LOADUP_WORKDIR}" ]
|
||||||
|
then
|
||||||
|
rm -rf "${LOADUP_OUTDIR}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
istagged() {
|
||||||
|
echo "$1" | grep -q "^${MEDLEYDIR}/loadups/tagged"
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# shellcheck disable=SC2164,SC2034
|
# shellcheck disable=SC2164,SC2034
|
||||||
if [ -z "${LOADUP_SCRIPTDIR}" ]
|
if [ -z "${LOADUP_SCRIPTDIR}" ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -667,7 +667,7 @@ borderwidth_arg=""
|
|||||||
remcm_arg="${LDEREMCM}"
|
remcm_arg="${LDEREMCM}"
|
||||||
repeat_cm=""
|
repeat_cm=""
|
||||||
automation=false
|
automation=false
|
||||||
use_branch=""
|
use_tag=""
|
||||||
|
|
||||||
# Add marker at end of args so we can accumulate pass-on args in args array
|
# Add marker at end of args so we can accumulate pass-on args in args array
|
||||||
set -- "$@" "--start_of_pass_args"
|
set -- "$@" "--start_of_pass_args"
|
||||||
@@ -682,13 +682,13 @@ do
|
|||||||
sysout_arg="apps"
|
sysout_arg="apps"
|
||||||
sysout_stage="${args_stage}"
|
sysout_stage="${args_stage}"
|
||||||
;;
|
;;
|
||||||
-br | -branch | --branch)
|
-tg | -tag | --tag)
|
||||||
if [ "$2" = "-" ]
|
if [ "$2" = "-" ]
|
||||||
then
|
then
|
||||||
use_branch="-"
|
use_tag="-"
|
||||||
else
|
else
|
||||||
check_for_dash_or_end "$1" "$2"
|
check_for_dash_or_end "$1" "$2"
|
||||||
use_branch="$2"
|
use_tag="$2"
|
||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
@@ -947,6 +947,11 @@ do
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-z | --man)
|
-z | --man)
|
||||||
|
if [ "$2" = "+" ]
|
||||||
|
then
|
||||||
|
export PAGER=cat
|
||||||
|
shift
|
||||||
|
fi
|
||||||
if [ "${darwin}" = true ]
|
if [ "${darwin}" = true ]
|
||||||
then
|
then
|
||||||
/usr/bin/man "${MEDLEYDIR}/docs/man-page/medley.1.gz"
|
/usr/bin/man "${MEDLEYDIR}/docs/man-page/medley.1.gz"
|
||||||
@@ -1134,65 +1139,73 @@ else
|
|||||||
fi
|
fi
|
||||||
export LDEDESTSYSOUT
|
export LDEDESTSYSOUT
|
||||||
|
|
||||||
# expand on use_branch, if needed
|
# expand on use_tag, if needed
|
||||||
|
|
||||||
if [ "${use_branch}" = "-" ]
|
if [ "${use_tag}" = "-" ]
|
||||||
then
|
then
|
||||||
git_commit_info "${MEDLEYDIR}"
|
git_commit_info "${MEDLEYDIR}"
|
||||||
use_branch="${BRANCH}"
|
use_tag="${BRANCH}"
|
||||||
if [ -z "${use_branch}" ]
|
if [ -z "${use_tag}" ]
|
||||||
then
|
then
|
||||||
output_warn_msg "A \"--branch -\" (\"-br -\") argument was given on the command line.${EOL}But either there is no git installed on this system or MEDLEYDIR (\"${MEDLEYDIR}\") is not a git directory.${EOL}Ignoring --branch argument.${EOL}"
|
output_warn_msg "A \"--tag -\" (\"-tg -\") argument was given on the command line.${EOL}But either there is no git installed on this system or MEDLEYDIR (\"${MEDLEYDIR}\") is not a git directory.${EOL}Ignoring --tag argument.${EOL}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# clean use_branch of no alphanumeric chars
|
# clean use_tag of no alphanumeric chars
|
||||||
|
|
||||||
if [ -n "${use_branch}" ]
|
if [ -n "${use_tag}" ]
|
||||||
then
|
then
|
||||||
use_branch="$(printf %s "${use_branch}" | sed "s/[^a-zA-Z0-9_.-]/_/g")"
|
use_tag="$(printf %s "${use_tag}" | sed "s/[^a-zA-Z0-9_.-]/_/g")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Figure out the branch/loadupsdir situation
|
# Figure out the tag/loadupsdir situation
|
||||||
|
|
||||||
slash_branch=""
|
slash_tag=""
|
||||||
if [ -n "${use_branch}" ]
|
if [ -n "${use_tag}" ]
|
||||||
then
|
then
|
||||||
branches_dir="${MEDLEYDIR}/loadups/branches"
|
# Set things up to use new tagged directory instead of old branches directory
|
||||||
mkdir -p "${branches_dir}"
|
# but set up symlink for backward compatibility
|
||||||
matches="$(cd "${branches_dir}" && ls -d "${use_branch}"*)"
|
if [ -d "${MEDLEYDIR}/loadups/branches" ] && [ ! -e "${MEDLEYDIR}/loadups/tagged" ]
|
||||||
|
then
|
||||||
|
mv "${MEDLEYDIR}/loadups/branches" "${MEDLEYDIR}/loadups/tagged"
|
||||||
|
ln -s "${MEDLEYDIR}/loadups/tagged" "${MEDLEYDIR}/loadups/branches"
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
tagged_dir="${MEDLEYDIR}/loadups/tagged"
|
||||||
|
mkdir -p "${tagged_dir}"
|
||||||
|
matches="$(cd "${tagged_dir}" && ls -d "${use_tag}"*)"
|
||||||
echo ${matches}
|
echo ${matches}
|
||||||
if [ -z "${matches}" ]
|
if [ -z "${matches}" ]
|
||||||
then
|
then
|
||||||
output_error_msg "The \"--branch ${use_branch}\" argument was given on the command line${EOL}but a directory matching \"${branches_dir}/${use_branch}*\" does not exist.${EOL}Exiting."
|
output_error_msg "The \"--tag ${use_tag}\" argument was given on the command line${EOL}but a directory matching \"${tagged_dir}/${use_tag}*\" does not exist.${EOL}Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
count=0
|
count=0
|
||||||
new_branch=""
|
new_tag=""
|
||||||
for match in ${matches}
|
for match in ${matches}
|
||||||
do
|
do
|
||||||
if [ "${match}" = "${use_branch}" ]
|
if [ "${match}" = "${use_tag}" ]
|
||||||
then
|
then
|
||||||
new_branch="${match}"
|
new_tag="${match}"
|
||||||
count=1
|
count=1
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
new_branch="${match}"
|
new_tag="${match}"
|
||||||
count=$((count + 1))
|
count=$((count + 1))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ "${count}" -ge 2 ]
|
if [ "${count}" -ge 2 ]
|
||||||
then
|
then
|
||||||
output_error_msg "The \"--branch ${use_branch}\" argument was given on the command line${EOL}but more than one subdirectory in \"${branches_dir}\" matches \"${use_branch}*\".${EOL}Exiting."
|
output_error_msg "The \"--tag ${use_tag}\" argument was given on the command line${EOL}but more than one subdirectory in \"${tagged_dir}\" matches \"${use_tag}*\".${EOL}Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
use_branch="${new_branch}"
|
use_tag="${new_tag}"
|
||||||
fi
|
fi
|
||||||
slash_branch="/branches/${use_branch}"
|
slash_tag="/tagged/${use_tag}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
loadups_dir="${MEDLEYDIR}/loadups${slash_branch}"
|
loadups_dir="${MEDLEYDIR}/loadups${slash_tag}"
|
||||||
export MEDLEY_LOADUPS_DIR="${loadups_dir}"
|
export MEDLEY_LOADUPS_DIR="${loadups_dir}"
|
||||||
|
|
||||||
# Figure out the sysout situation
|
# Figure out the sysout situation
|
||||||
@@ -1418,10 +1431,10 @@ then
|
|||||||
else
|
else
|
||||||
title="$(printf %s "${title}" | sed -e "s/%i/::${run_id}/")"
|
title="$(printf %s "${title}" | sed -e "s/%i/::${run_id}/")"
|
||||||
fi
|
fi
|
||||||
if [ -n "${use_branch}" ]
|
if [ -n "${use_tag}" ]
|
||||||
then
|
then
|
||||||
short_branch="$(printf "%0.16s" "${use_branch}")"
|
short_tag="$(printf "%0.16s" "${use_tag}")"
|
||||||
title="$(printf %s "${title}" | sed -e "s/%b/::${short_branch}/")"
|
title="$(printf %s "${title}" | sed -e "s/%b/::${short_tag}/")"
|
||||||
else
|
else
|
||||||
title="$(printf %s "${title}" | sed -e "s/%b//")"
|
title="$(printf %s "${title}" | sed -e "s/%b//")"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ borderwidth_arg=""
|
|||||||
remcm_arg="${LDEREMCM}"
|
remcm_arg="${LDEREMCM}"
|
||||||
repeat_cm=""
|
repeat_cm=""
|
||||||
automation=false
|
automation=false
|
||||||
use_branch=""
|
use_tag=""
|
||||||
|
|
||||||
# Add marker at end of args so we can accumulate pass-on args in args array
|
# Add marker at end of args so we can accumulate pass-on args in args array
|
||||||
set -- "$@" "--start_of_pass_args"
|
set -- "$@" "--start_of_pass_args"
|
||||||
@@ -64,13 +64,13 @@ do
|
|||||||
sysout_arg="apps"
|
sysout_arg="apps"
|
||||||
sysout_stage="${args_stage}"
|
sysout_stage="${args_stage}"
|
||||||
;;
|
;;
|
||||||
-br | -branch | --branch)
|
-tg | -tag | --tag)
|
||||||
if [ "$2" = "-" ]
|
if [ "$2" = "-" ]
|
||||||
then
|
then
|
||||||
use_branch="-"
|
use_tag="-"
|
||||||
else
|
else
|
||||||
check_for_dash_or_end "$1" "$2"
|
check_for_dash_or_end "$1" "$2"
|
||||||
use_branch="$2"
|
use_tag="$2"
|
||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
@@ -329,6 +329,11 @@ do
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-z | --man)
|
-z | --man)
|
||||||
|
if [ "$2" = "+" ]
|
||||||
|
then
|
||||||
|
export PAGER=cat
|
||||||
|
shift
|
||||||
|
fi
|
||||||
if [ "${darwin}" = true ]
|
if [ "${darwin}" = true ]
|
||||||
then
|
then
|
||||||
/usr/bin/man "${MEDLEYDIR}/docs/man-page/medley.1.gz"
|
/usr/bin/man "${MEDLEYDIR}/docs/man-page/medley.1.gz"
|
||||||
|
|||||||
@@ -52,65 +52,73 @@ else
|
|||||||
fi
|
fi
|
||||||
export LDEDESTSYSOUT
|
export LDEDESTSYSOUT
|
||||||
|
|
||||||
# expand on use_branch, if needed
|
# expand on use_tag, if needed
|
||||||
|
|
||||||
if [ "${use_branch}" = "-" ]
|
if [ "${use_tag}" = "-" ]
|
||||||
then
|
then
|
||||||
git_commit_info "${MEDLEYDIR}"
|
git_commit_info "${MEDLEYDIR}"
|
||||||
use_branch="${BRANCH}"
|
use_tag="${BRANCH}"
|
||||||
if [ -z "${use_branch}" ]
|
if [ -z "${use_tag}" ]
|
||||||
then
|
then
|
||||||
output_warn_msg "A \"--branch -\" (\"-br -\") argument was given on the command line.${EOL}But either there is no git installed on this system or MEDLEYDIR (\"${MEDLEYDIR}\") is not a git directory.${EOL}Ignoring --branch argument.${EOL}"
|
output_warn_msg "A \"--tag -\" (\"-tg -\") argument was given on the command line.${EOL}But either there is no git installed on this system or MEDLEYDIR (\"${MEDLEYDIR}\") is not a git directory.${EOL}Ignoring --tag argument.${EOL}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# clean use_branch of no alphanumeric chars
|
# clean use_tag of no alphanumeric chars
|
||||||
|
|
||||||
if [ -n "${use_branch}" ]
|
if [ -n "${use_tag}" ]
|
||||||
then
|
then
|
||||||
use_branch="$(printf %s "${use_branch}" | sed "s/[^a-zA-Z0-9_.-]/_/g")"
|
use_tag="$(printf %s "${use_tag}" | sed "s/[^a-zA-Z0-9_.-]/_/g")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Figure out the branch/loadupsdir situation
|
# Figure out the tag/loadupsdir situation
|
||||||
|
|
||||||
slash_branch=""
|
slash_tag=""
|
||||||
if [ -n "${use_branch}" ]
|
if [ -n "${use_tag}" ]
|
||||||
then
|
then
|
||||||
branches_dir="${MEDLEYDIR}/loadups/branches"
|
# Set things up to use new tagged directory instead of old branches directory
|
||||||
mkdir -p "${branches_dir}"
|
# but set up symlink for backward compatibility
|
||||||
matches="$(cd "${branches_dir}" && ls -d "${use_branch}"*)"
|
if [ -d "${MEDLEYDIR}/loadups/branches" ] && [ ! -e "${MEDLEYDIR}/loadups/tagged" ]
|
||||||
|
then
|
||||||
|
mv "${MEDLEYDIR}/loadups/branches" "${MEDLEYDIR}/loadups/tagged"
|
||||||
|
ln -s "${MEDLEYDIR}/loadups/tagged" "${MEDLEYDIR}/loadups/branches"
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
tagged_dir="${MEDLEYDIR}/loadups/tagged"
|
||||||
|
mkdir -p "${tagged_dir}"
|
||||||
|
matches="$(cd "${tagged_dir}" && ls -d "${use_tag}"*)"
|
||||||
echo ${matches}
|
echo ${matches}
|
||||||
if [ -z "${matches}" ]
|
if [ -z "${matches}" ]
|
||||||
then
|
then
|
||||||
output_error_msg "The \"--branch ${use_branch}\" argument was given on the command line${EOL}but a directory matching \"${branches_dir}/${use_branch}*\" does not exist.${EOL}Exiting."
|
output_error_msg "The \"--tag ${use_tag}\" argument was given on the command line${EOL}but a directory matching \"${tagged_dir}/${use_tag}*\" does not exist.${EOL}Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
count=0
|
count=0
|
||||||
new_branch=""
|
new_tag=""
|
||||||
for match in ${matches}
|
for match in ${matches}
|
||||||
do
|
do
|
||||||
if [ "${match}" = "${use_branch}" ]
|
if [ "${match}" = "${use_tag}" ]
|
||||||
then
|
then
|
||||||
new_branch="${match}"
|
new_tag="${match}"
|
||||||
count=1
|
count=1
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
new_branch="${match}"
|
new_tag="${match}"
|
||||||
count=$((count + 1))
|
count=$((count + 1))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ "${count}" -ge 2 ]
|
if [ "${count}" -ge 2 ]
|
||||||
then
|
then
|
||||||
output_error_msg "The \"--branch ${use_branch}\" argument was given on the command line${EOL}but more than one subdirectory in \"${branches_dir}\" matches \"${use_branch}*\".${EOL}Exiting."
|
output_error_msg "The \"--tag ${use_tag}\" argument was given on the command line${EOL}but more than one subdirectory in \"${tagged_dir}\" matches \"${use_tag}*\".${EOL}Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
use_branch="${new_branch}"
|
use_tag="${new_tag}"
|
||||||
fi
|
fi
|
||||||
slash_branch="/branches/${use_branch}"
|
slash_tag="/tagged/${use_tag}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
loadups_dir="${MEDLEYDIR}/loadups${slash_branch}"
|
loadups_dir="${MEDLEYDIR}/loadups${slash_tag}"
|
||||||
export MEDLEY_LOADUPS_DIR="${loadups_dir}"
|
export MEDLEY_LOADUPS_DIR="${loadups_dir}"
|
||||||
|
|
||||||
# Figure out the sysout situation
|
# Figure out the sysout situation
|
||||||
@@ -257,10 +265,10 @@ then
|
|||||||
else
|
else
|
||||||
title="$(printf %s "${title}" | sed -e "s/%i/::${run_id}/")"
|
title="$(printf %s "${title}" | sed -e "s/%i/::${run_id}/")"
|
||||||
fi
|
fi
|
||||||
if [ -n "${use_branch}" ]
|
if [ -n "${use_tag}" ]
|
||||||
then
|
then
|
||||||
short_branch="$(printf "%0.16s" "${use_branch}")"
|
short_tag="$(printf "%0.16s" "${use_tag}")"
|
||||||
title="$(printf %s "${title}" | sed -e "s/%b/::${short_branch}/")"
|
title="$(printf %s "${title}" | sed -e "s/%b/::${short_tag}/")"
|
||||||
else
|
else
|
||||||
title="$(printf %s "${title}" | sed -e "s/%b//")"
|
title="$(printf %s "${title}" | sed -e "s/%b//")"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
|
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
|
||||||
|
|
||||||
(FILECREATED "11-Jul-2025 00:17:20" {WMEDLEY}<sources>MEDLEYDIR.;32 11437
|
(FILECREATED "18-Aug-2025 11:19:10" {DSK}<home>frank>il>xmedley>sources>MEDLEYDIR.;2 11928
|
||||||
|
|
||||||
:EDIT-BY rmk
|
:EDIT-BY "FGH"
|
||||||
|
|
||||||
:CHANGES-TO (VARS MEDLEY-INIT-VARS)
|
:CHANGES-TO (FNS MEDLEYDIR)
|
||||||
(FNS MEDLEY-INIT-VARS MEDLEYDIR MEDLEYSUBSTDIR SET-SYSOUT-COMMIT)
|
|
||||||
|
|
||||||
:PREVIOUS-DATE "15-May-2025 00:18:25" {WMEDLEY}<sources>MEDLEYDIR.;31)
|
:PREVIOUS-DATE "11-Jul-2025 00:17:20" {DSK}<home>frank>il>xmedley>sources>MEDLEYDIR.;1)
|
||||||
|
|
||||||
|
|
||||||
(PRETTYCOMPRINT MEDLEYDIRCOMS)
|
(PRETTYCOMPRINT MEDLEYDIRCOMS)
|
||||||
@@ -100,7 +99,8 @@
|
|||||||
NIL])
|
NIL])
|
||||||
|
|
||||||
(MEDLEYDIR
|
(MEDLEYDIR
|
||||||
[LAMBDA (DIRNAME FILENAME OUTPUT NOERROR) (* ; "Edited 29-Jun-2023 22:48 by rmk")
|
[LAMBDA (DIRNAME FILENAME OUTPUT NOERROR) (* ; "Edited 18-Aug-2025 11:15 by FGH")
|
||||||
|
(* ; "Edited 29-Jun-2023 22:48 by rmk")
|
||||||
(* ; "Edited 18-Oct-2022 17:49 by lmm")
|
(* ; "Edited 18-Oct-2022 17:49 by lmm")
|
||||||
(* ; "Edited 5-Mar-2022 12:43 by larry")
|
(* ; "Edited 5-Mar-2022 12:43 by larry")
|
||||||
(* ; "Edited 2-Dec-2021 20:23 by kaplan")
|
(* ; "Edited 2-Dec-2021 20:23 by kaplan")
|
||||||
@@ -122,6 +122,14 @@
|
|||||||
[(EQUAL DIRNAME "login") (* ; "special case for login dir")
|
[(EQUAL DIRNAME "login") (* ; "special case for login dir")
|
||||||
(DIRECTORYNAME (OR (UNIX-GETENV "LOGINDIR")
|
(DIRECTORYNAME (OR (UNIX-GETENV "LOGINDIR")
|
||||||
(UNIX-GETENV "HOME"]
|
(UNIX-GETENV "HOME"]
|
||||||
|
[(EQUAL DIRNAME "loadups") (* ; "special case for loadups dir")
|
||||||
|
(OR (DIRECTORYNAME (UNIX-GETENV "MEDLEY_LOADUPS_DIR"))
|
||||||
|
(DIRECTORYNAME (CONCAT (MEDLEYDIR)
|
||||||
|
"loadups" ">")
|
||||||
|
NIL OUTPUT)
|
||||||
|
(if NOERROR
|
||||||
|
then NIL
|
||||||
|
else (ERROR "Cannot find medley loadups directory" (MEDLEYDIR]
|
||||||
((LISTP DIRNAME)
|
((LISTP DIRNAME)
|
||||||
(for X Y in DIRNAME when (SETQ Y (MEDLEYDIR X FILENAME OUTPUT NOERROR)) collect Y))
|
(for X Y in DIRNAME when (SETQ Y (MEDLEYDIR X FILENAME OUTPUT NOERROR)) collect Y))
|
||||||
[FILENAME (if (NULL (SETQ DIRNAME (MEDLEYDIR DIRNAME NIL OUTPUT NOERROR)))
|
[FILENAME (if (NULL (SETQ DIRNAME (MEDLEYDIR DIRNAME NIL OUTPUT NOERROR)))
|
||||||
@@ -228,6 +236,6 @@
|
|||||||
(ADDTOVAR GLOBALVARS MEDLEYDIR MEDLEY-INIT-VARS \SAVE.MEDLEYDIR DIRECTORIES SYSOUTCOMMITS)
|
(ADDTOVAR GLOBALVARS MEDLEYDIR MEDLEY-INIT-VARS \SAVE.MEDLEYDIR DIRECTORIES SYSOUTCOMMITS)
|
||||||
)
|
)
|
||||||
(DECLARE%: DONTCOPY
|
(DECLARE%: DONTCOPY
|
||||||
(FILEMAP (NIL (1731 8805 (MEDLEY-INIT-VARS 1741 . 5219) (MEDLEYDIR 5221 . 7605) (MEDLEYSUBSTDIR 7607
|
(FILEMAP (NIL (1675 9296 (MEDLEY-INIT-VARS 1685 . 5163) (MEDLEYDIR 5165 . 8096) (MEDLEYSUBSTDIR 8098
|
||||||
. 8585) (SET-SYSOUT-COMMIT 8587 . 8803)))))
|
. 9076) (SET-SYSOUT-COMMIT 9078 . 9294)))))
|
||||||
STOP
|
STOP
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user