Commit Graph

180 Commits

Author SHA1 Message Date
Xavier Delaruelle
3b1faeb181 Use main as new name for default git branch 2022-10-30 13:26:31 +01:00
Lukáš Zaoral
0d6bc10c70 lint(ShellCheck): fix SC2163 warning
According to ShellCheck's documentation:

export takes a variable name, but ShellCheck has noticed that you give it
an expanded variable instead.  Remove $/${} for that, or use ${var?} to quiet.

Related: https://www.shellcheck.net/wiki/SC2163
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
d018f7a9e6 lint(ShellCheck): fix SC2086 info diagnostic
Some variables, that were unquoted intentionally were converted to arrays.

According to ShellCheck's documentation:

Quoting variables prevents word splitting and glob expansion, and prevents
the script from breaking when input contains spaces, line feeds, glob
characters and such.

Related: https://www.shellcheck.net/wiki/SC2086
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
5939a00154 lint(ShellCheck): fix SC2155 warning
According to ShellCheck's documentation:

In the original code, the return value of mycmd in $(mycmd) is ignored,
and export will instead always return true.  This may prevent conditionals,
set -e and traps from working correctly.

Related: https://www.shellcheck.net/wiki/SC2155
Related: #470
2022-09-02 09:52:05 +02:00
Lukáš Zaoral
65309830cb lint(ShellCheck): fix SC2166 warning
According to ShellCheck's documentation:

-a and -o  in [ .. ] test expressions are not well defined, and can cause
incorrect results when arguments start with dashes or contain !.

Related: https://www.shellcheck.net/wiki/SC2166
Related: #470
2022-09-02 09:52:05 +02:00
Xavier Delaruelle
06c61c7b1b install: add --nagelfardatadir/--enable-nagelfar-addons
Add --nagelfardatadir and --enable-nagelfar-addons installation option
to control whether or not Modules-specific Nagelfar files need to be
installed and in what location.
2022-07-12 07:50:33 +02:00
Xavier Delaruelle
083a8e3a24 install: warning if tcllinter program not found 2022-07-12 07:50:32 +02:00
Xavier Delaruelle
d40261c763 install: add --with-tcl-linter-opts configure option
Introduce the --with-tcl-linter-opts configure option to choose at
installation time the options to pass to the tcl linter program. Default
option is ''.
2022-07-12 07:50:32 +02:00
Xavier Delaruelle
111db3af55 install: add --with-tcl-linter configure option
Introduce the --with-tcl-linter configure option to choose at
installation time the default program command to use to lint
modulefiles. Default Tcl linter is 'nagelfar.tcl'.
2022-07-12 07:43:19 +02:00
Xavier Delaruelle
11d2b6a6ad install: fix libdir64/32 guess in configure script
Update configure script to better guess the libdir64 and libdir32
directory locations based on specified libdir.

Correctly guess these directories when libdir does not end with '64' but
contains '64' like in '/usr/lib64/environment-modules'.
2022-05-03 15:34:53 +02:00
Xavier Delaruelle
cd4015b106 Revert work on noglob_eval_shells config option
Remove entirely the work on the noglob_eval_shells option as enclosing
in quotes the generated output of modulecmd.tcl to pass it to the eval
command is equivalent to disable the pathname expansion mechanism of
sh-kind shells.
2022-02-24 18:24:47 +01:00
Xavier Delaruelle
67b5fedad9 install: add --with-noglob-eval-shells configure opt
Introduce the --with-noglob-eval-shells configure option to choose at
installation time if the pathname expansion should be disabled or not in
the module function to evaluate shell code produced by modulecmd.tcl,
for the shells listed in option value.
2022-02-19 15:56:43 +01:00
Dimitri Papadopoulos
e9a6678eec Fix typos found by codespell 2022-02-15 05:54:03 +01:00
Xavier Delaruelle
40dec310a9 New year (2022) copyright mention update 2022-01-02 21:08:37 +01:00
Xavier Delaruelle
c20f3ddb27 install: add default abbrev/sgr for keep-loaded tag 2021-12-18 10:05:24 +01:00
Xavier Delaruelle
ff1db855ba install: add --with-fishcompletiondir configure opt
Add the --with-fishcompletiondir option to the configure installation
script to define a particular installation directory for the fish
completion script.

If option is not defined, fish completion script is installed by default
in initdir and it is sourced in fish init script. If option is set,
completion script is installed in designated directory and fish init
script does not source it.
2021-11-24 08:51:03 +01:00
Xavier Delaruelle
ee37f69f46 install: add --with-bashcompletiondir configure opt
Add the --with-bashcompletiondir option to the configure installation
script to define a particular installation directory for the bash
completion script.

If option is not defined, bash completion script is installed by default
in initdir and it is sourced in bash init script. If option is set,
completion script is installed in designated directory and bash init
script does not source it.
2021-11-24 08:51:03 +01:00
Xavier Delaruelle
b483dbf7c3 install: add --with-zshcompletiondir configure opt
Add the --with-zshcompletiondir option to the configure installation
script to define a particular installation directory for the zsh
completion script.

If option is not defined, zsh completion script is installed by default
in initdir and the FPATH environment variable is set in zsh init script.
If option is set, completion script is installed in designated directory
and zsh init script does not set the FPATH environment variable.

Fixes #428
2021-11-24 08:50:52 +01:00
Xavier Delaruelle
05f3c9cde0 doc/install: rename 'diff_v3_v4' doc into 'changes' 2021-09-06 06:55:34 +02:00
Xavier Delaruelle
11c7a0c6d6 install: disable silent_shell_debug by default
Change installation option --enable-silent-shell-debug-support to
disable it by default. Now the silent_shell_debug configuration option
enables to locally enable this feature from the initrc configuration
file.
2021-08-31 20:59:18 +02:00
Xavier Delaruelle
1283c28d2e install: disable quarantine_support by default
Change installation option --enable-quarantine-support to disable it by
default. Now the quarantine_support configuration option enables to
locally enable this feature from the initrc configuration file.
2021-08-26 21:21:30 +02:00
Xavier Delaruelle
9cb14536a0 install: remove useless gitworktree install config var 2021-07-24 14:06:09 +02:00
Xavier Delaruelle
d358efd18c install: remove useless EXEEXT install config var 2021-07-24 14:06:09 +02:00
Xavier Delaruelle
2fdaf5449a install: remove --enable-compat-version install option
Remove installation option '--enable-compat-version'. Compatiblity
version co-installation is discontinued.
2021-07-24 14:06:06 +02:00
Xavier Delaruelle
664808acd7 install: swap --enable-dotmodulespath/--enable-modulespath
Make --enable-modulespath the primary option name and
--enable-dotmodulespath the secondary option name as .modulespath is not
anymore the primary name of this configuration file.
2021-07-18 22:06:02 +02:00
Xavier Delaruelle
2e2e3c3275 install: set --with-initconf-in to etcdir by default
Installation option '--with-initconf-in' is set to 'etdir' by default
to locate configuration files in the directory designated by the
'--etcdir' option. Therefore the initialization configuration file is
named `initrc` in this directory, and the  modulepath-specific
configuration file is named `modulespath`.

Configuration files are thus located in a traditional etcdir rather
being part of the init dir among scripts that should stay read only.
2021-07-18 16:06:20 +02:00
Xavier Delaruelle
372ea4edd1 missing/doc: missing inst opt default value mention 2021-07-16 22:53:40 +02:00
Xavier Delaruelle
6050cb7216 install: set --enable-set-shell-startup off by default
Installation option '--enable-set-shell-startup' is set off by default
but could be enabled once installed through the `initrc` configuration
file.

It seems better to let people choose to enable this option than being
surprised to find Modules initialization script run automatically each
time a sub-shell is spawn.
2021-07-16 22:04:27 +02:00
Xavier Delaruelle
9383c006a4 install: reset --enable-new-features
Installation option '--enable-new-features' has been reset following
major version change as all the options it implied are now enabled by
default.
2021-07-16 21:21:15 +02:00
Xavier Delaruelle
86cb6dc4f6 install: set --with-icase on by default
Installation option '--with-icase' is set to `search` by default to
activate case insensitive match on search contexts.
2021-07-16 15:56:45 +02:00
Xavier Delaruelle
65fffd85fc install: set --enable-color on by default
Installation option '--enable-color' is set on by default which enables
the `auto` output color mode.
2021-07-16 15:56:45 +02:00
Xavier Delaruelle
0d322333f9 install: set --enable-advanced-version-spec on by default
Installation option '--enable-advanced-version-spec' is set on by
default which activates the Advanced module version specifiers.
2021-07-16 15:56:45 +02:00
Xavier Delaruelle
357c915533 install: set --enable-extended-default on by default
Installation option '--enable-extended-default' is set on by default
which allows partial module version specification.
2021-07-16 15:56:45 +02:00
Xavier Delaruelle
25af5e70a5 install: set --enable-auto-handling on by default
Installation option '--enable-auto-handling' is set on by default which
enables the automated module handling mode.
2021-07-16 15:56:45 +02:00
Xavier Delaruelle
1d63f5de04 install: remove debug statement in configure 2021-07-16 15:56:45 +02:00
Xavier Delaruelle
f4b69a2e9d install: add --with-variant-shortcut configure option 2021-06-28 20:44:23 +02:00
Xavier Delaruelle
e893e8f686 install/doc: add va color key
Add the `va` color key in default light and dark color palettes to
graphically enhance the report of variant value.
2021-06-21 20:43:10 +02:00
Xavier Delaruelle
1c5bbd6c90 install/doc: add variant element on list_*output configs
Add the element `variant` in the allow list of the list_output and
list_terse_output configuration options. Set this new element in the
default value list of the list_output configuration option.
2021-06-21 20:43:10 +02:00
Xavier Delaruelle
db74c4cbdf install: allow building from submodule repository
Fix installation scripts to allow building Modules when its repository
is set as a git submodule.

Closes #398.
2021-05-11 20:14:07 +02:00
Xavier Delaruelle
c00ecefaa4 install: add --with-editor configure option
Introduce the --with-editor configure option to choose at installation
time the default editor command to use to interactively edit
modulefiles. Default editor is 'vi'.
2021-04-24 13:36:51 +02:00
Xavier Delaruelle
17cd13c0bf install: re-license configure script from GPLv3+ to GPLv2+
Change license of the configure installation script from GPLv3+ to
GPLv2+.

Align this way all files from the Modules project under the GPLv2+
license.

Consent has been obtained from the copyright holders (I, @xdch47 and
@jraphanel) to perform such move. Consent from Jacques Raphanel and
Felix Neumärker were collected by email.

Revert contribution from R.K. Owen (cc4d3194), from whom consent is not
yet obtained. Contribution will be restored as soon as consent will be
obrained.

Related to #389
2021-03-02 20:14:57 +01:00
Xavier Delaruelle
cc9c468270 install: add -i opt to lib autoreconf
Ensure missing auxiliary file are copied when running autoreconf for
Modules Tcl extension library.
2021-02-17 16:04:04 +01:00
Xavier Delaruelle
8f93a65713 install: split configure err msg over an extra line 2021-02-08 07:17:38 +01:00
Xavier Delaruelle
8b00f850c2 install: color ERROR/WARNING msg header in configure
Color the *ERROR* and *WARNING* message headers produced by configure
script if output is sent to a terminal.
2021-02-08 07:17:38 +01:00
Xavier Delaruelle
dd45d45988 install: check --with-nearly-forbidden-days int value
Check the value set for the --with-nearly-forbidden-days option is an
integer comprised between 0 and 365.
2021-02-08 07:17:38 +01:00
Xavier Delaruelle
f5dfb30fcb Add {avail,list}_{terse_,}output configurations 2021-02-08 07:17:37 +01:00
Xavier Delaruelle
12bfe42cc3 install: correctly detect pre-built doc environment
Do not set docs as pre-built if configure script is ran another time
after building doc.
2021-02-06 13:03:35 +01:00
R.K. Owen
cc4d3194d6 install: fix configure script when called from PATH
Have configure assume the '.' dot directory when invoked without the
prepended ./
2021-02-06 13:01:27 +01:00
Xavier Delaruelle
06f049c3ee Add mcookie_version_check config
Add mcookie_version_check configuration to disable the version check on
the Modules magic cookie used in modulefiles. Option, enabled by
default, is linked to the MODULES_MCOOKIE_VERSION_CHECK environment
variable.

Closes #377.
2021-01-25 06:08:13 +01:00
Xavier Delaruelle
ab21a6e656 install: add --enable-new-features configure option
Introduce --enable-new-features configure option to enable all at once
all the new features disabled by default due to the behavior change they
introduced on Modules 4.

--enable-new-features option is equivalent to --enable-auto-handling,
--enable-color, --with-icase=search, --enable-extended-default,
--enable-advanced-version-spec.
2021-01-15 06:50:17 +01:00