-
Notifications
You must be signed in to change notification settings - Fork 0
Config: JSON
鄭余玄 edited this page Jan 21, 2019
·
5 revisions
Define all available packages.
ex:
{
"jdk-1.8": {
"__prefix": "{HOME}/.local/jdk1.8.0",
"__meta": "standard",
"JAVA_HOME": "{PREFIX}"
},
"intel-2019": {
"__keywords": ["intel"],
"__prefix": "/opt/intel/2019",
"__cmd": "source {PREFIX}/bin/compilervars.sh intel64"
}
}
-
jdk-1.8
is the unique name of a package. - keys start with
__
are reserved; while others (usually uppercase) are directly used for environment variables.-
__keywords
(list of string): provide short alias(es) of a package. -
__prefix
(string): use for{PREFIX}
string interpolation. -
__cmd
(string): direct command execution. -
__meta
(string): apply a meta template frommeta.json
.
-
- the value of an environment variable could be a string or a list of string.
- string interpolation
-
{HOME}
: defined by the environment variable$HOME
. -
{PREFIX}
: defined by__prefix
value.
-
Define meta package templates.
ex:
{
"gcc": {
"LD_LIBRARY_PATH": ["{PREFIX}/lib", "{PREFIX}/lib64", "{PREFIX}/libexec"],
"PATH": "{PREFIX}/bin"
},
"intel": {
"__cmd": "source {PREFIX}/bin/compilervars.sh intel64"
}
}
-
gcc
is the unique name of a meta package. - keys start with
__
are reserved; while others (usually uppercase) are directly used for environment variables.-
__keywords
(list of string): provide short alias(es) of a meta package. -
__cmd
(string): direct command execution.
-
- the value of an environment variable could be a string or a list of string.
- strings can be prepared for further string interpolations.