Shell Environment Variables/en: Unterschied zwischen den Versionen
Cg (Diskussion | Beiträge) |
Cg (Diskussion | Beiträge) |
||
Zeile 24: | Zeile 24: | ||
If no script interpreter was defined in the settings dialog, fallbacks can be provided by the following shell variables: |
If no script interpreter was defined in the settings dialog, fallbacks can be provided by the following shell variables: |
||
* '''CMD_SHELL''' (batch scripts; defaults to "cmd") |
* '''CMD_SHELL''' (batch scripts; defaults to "<code>cmd</code>") |
||
* '''SHELL''' (shell commands and shell scripts; defaults to "bash" or "sh", whichever is found) |
* '''SHELL''' (shell commands and shell scripts; defaults to "<code>bash</code>" or "<code>sh</code>", whichever is found) |
||
* '''POWERSHELL''' (powershell scripts; defaults to "powershell" or "pwsh", whichever is found) |
* '''POWERSHELL''' (powershell scripts; defaults to "<code>powershell</code>" or "<code>pwsh</code>", whichever is found) |
||
* '''RUBY_SHELL''' (ruby scripts; defaults to "ruby") |
* '''RUBY_SHELL''' (ruby scripts; defaults to "<code>ruby</code>") |
||
* '''PYTHON_SHELL''' (python scripts; defaults to "python") |
* '''PYTHON_SHELL''' (python scripts; defaults to "<code>python</code>") |
||
* '''PERL_SHELL''' (perl scripts; defaults to "perl") |
* '''PERL_SHELL''' (perl scripts; defaults to "<code>perl</code>") |
||
* '''TCL_SHELL''' (tcl scripts; defaults to "tclsh") |
* '''TCL_SHELL''' (tcl scripts; defaults to "<code>tclsh</code>") |
||
* '''NODEJS_SHELL''' (node.js scripts; defaults to "node") |
* '''NODEJS_SHELL''' (node.js scripts; defaults to "<code>node</code>") |
||
* '''GO_SHELL''' (go scripts; defaults to "go") |
* '''GO_SHELL''' (go scripts; defaults to "<code>go</code>") |
||
* '''GNUPLOT_SHELL''' (gnuplot scripts; defaults to "gnuplot") |
* '''GNUPLOT_SHELL''' (gnuplot scripts; defaults to "<code>gnuplot</code>") |
||
* '''RSCRIPT_SHELL''' ('R' scripts; defaults to "R.exe" on Windows, "r" on OSX, "R" on Unix/Linux) |
* '''RSCRIPT_SHELL''' ('R' scripts; defaults to "<code>R.exe</code>" on Windows, "<code>r</code>" on OSX, "<code>R</code>" on Unix/Linux) |
Version vom 14. Juni 2018, 16:30 Uhr
Shell Environment Variables[Bearbeiten]
A number of shell environment variables are used (if present) by expecco and/or the underlying Smalltalk runtime system. Their existance is not a prerequisite to run expecco: default values will be used, if those variables are not present.
Temporary Files Folder[Bearbeiten]
Expecco (and Smalltalk) may create temporary files, which may outlive your session, in case of an abnormal termination (or in case a suite fails to cleanup temporary files correctly).
By default, temporary files are created inside a per-session temporary folder.
This per-session temporary folder is named "stx_tmp_xxxx
" (where xxxx is a session/process-ID) and is created in the tempdir folder.
The tempdir folder is specified by any of: STX_TMPDIR
, TMP_DIR
, TEMP_DIR
, TMPDIR
or TEMPDIR
,
whichever is found in the shell environment.
If none of the above is found in the shell environment, "/tmp
" is used as tempdir.
All per-session temporary files are created in this one temporary folder, to make it easier to cleanup leftover session files.
Actually, if no expecco/Smalltalk is running, all temporary file folders named "stx_tmp_xxx
" can be removed without danger (although temp-file cleanup is typically done automatically by the operating system in regular intervals)
The name of the temporary folder can be retrieved by evaluating and printing:
Filename tempDirectory
(doing a "printIt" in a Smalltalk workspace), or via a corresponding action block in the standardlibrary.
Script Interpreters for External Language Scripts[Bearbeiten]
If no script interpreter was defined in the settings dialog, fallbacks can be provided by the following shell variables:
- CMD_SHELL (batch scripts; defaults to "
cmd
") - SHELL (shell commands and shell scripts; defaults to "
bash
" or "sh
", whichever is found) - POWERSHELL (powershell scripts; defaults to "
powershell
" or "pwsh
", whichever is found) - RUBY_SHELL (ruby scripts; defaults to "
ruby
") - PYTHON_SHELL (python scripts; defaults to "
python
") - PERL_SHELL (perl scripts; defaults to "
perl
") - TCL_SHELL (tcl scripts; defaults to "
tclsh
") - NODEJS_SHELL (node.js scripts; defaults to "
node
") - GO_SHELL (go scripts; defaults to "
go
") - GNUPLOT_SHELL (gnuplot scripts; defaults to "
gnuplot
") - RSCRIPT_SHELL ('R' scripts; defaults to "
R.exe
" on Windows, "r
" on OSX, "R
" on Unix/Linux)