#
# Dos9 Manual pages, The Dos9 project
# Copyright (C) 2012-2014 Romain Garbi (DarkBatcher)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
{{%DOS9_VERSION%, %DOS9_OS%, %DOS9_OS_TYPE%, %DOS9_PATH%, %DOS9_SHARE%, %DOS9_ETC%, %DOS9_IS_SCRIPT% variables}}
The {%DOS9_VERSION%} variable expands to the current version of
{dos9|Dos9}.
The {%DOS9_OS%} variable expands to the name of the current {OS} running
{dos9|Dos9}.
The {%DOS9_OS_TYPE%} variable expands to the type of the current {OS} running
{dos9|Dos9}.
The {%DOS9_PATH%} variables expands to the path to {dos9|Dos9} directory.
The {%DOS9_IS_SCRIPT%} variable is used to detect whether the execution
flow comes from a script or from the prompt.
{%DOS9_SHARE%} and {%DOS9_ETC%} expands to the locations of various
{dos9|Dos9} files.
{{Synopsis}}
${%DOS9_VER%}
Contain {dos9|Dos9} version number.
${%DOS9_OS%}
Contains the OS name on which {Dos9} is runnig. This variable does
not give any information on OS version though. The possible value are:
- {WINDOWS}
- {GNU/Linux}
- {NetBSD}
- {OpenBSD}
- {DragonFlyBSD}
- If none of these operating system is found by {Dos9}, then {%DOS9_OS_TYPE%}
will contain the host triplet for which Dos9 has been compiled.
This variable is interesting to execute specific code for any of these
platforms. In most cases, the variable {%DOS9_OS_TYPE%} is sufficient.
${%DOS9_PATH%}
{%DOS9_PATH%} contains the path to the {dos9|Dos9} executable. This path is
dinamically generated, so that the path will be correct even from non
conventionnal paths, this enables making portable version on removable
media.
${%DOS9_OS_TYPE%}
Contains the type of operating system on which Dos9 is running. It can
have two values:
- {*NIX} : For Unix-based operating systems.
- {WINDOWS} : For windows based operating systems.
${%DOS9_IS_SCRIPT%}
Expands to {false} if {dos9|Dos9} has been launched in interactive mode
(that is, with no script to execute) or {true} else. This value is useful
inside configuration scripts such as {dos9auto|Dos9_Auto.bat}. The value
of {%DOS9_IS_SCRIPT%} is inherited when a script is {call|CALL}ed, however,
the value is overwritten in any other case.
${%DOS9_SHARE%}
Contains the path to the folder where Dos9 static data is stored.
${%DOS9_ETC%}
Contains the path to the folder where Dos9 configuration files are stored.
{{Compatibility}}
Uncompatible with {cmd.exe}, these variable are not defined.
Availiable since version {0.7}.
{{See also}}
{spec/var|Environment variables}, {spec/index|Specifications index}