Provides information about the executables built by BASIS.
More...
#include "${_EXECUTABLETARGETINFO_DIR}/core.sh"
Go to the source code of this file.
Functions |
function | _executabletargetinfo_add (in key, in name, in value) |
| Add (key, value) pair to executable target info "hash".
|
function | _executabletargetinfo_get (in value, in key, in name) |
| Get value from executable target info "hash".
|
function | _executabletargetinfo_initialize () |
| Initialize executable target information.
|
function | _executabletargetinfo_sanitize (in out, in str) |
| Sanitize string for use in variable name.
|
function | _executabletargetinfo_to_absolute_path (in simplified, in path, in base) |
| Make relative path absolute.
|
function | get_executable_directory (in dir, in target) |
| Get directory of executable file.
|
function | get_executable_name (in name, in target) |
| Get name of executable file.
|
function | get_executable_path (in path, in target) |
| Get absolute path of executable file.
|
function | get_target_uid (in uid, in target) |
| Get UID of build target.
|
function | is_known_target (in target) |
| Determine whether a given target is known.
|
Detailed Description
Provides information about the executables built by BASIS.
- Note:
- The executabletargetinfo.sh module is automatically created by BASIS from the template file executabletargetinfo.sh.in which is part of the BASIS installation.
Copyright (c) 2011 University of Pennsylvania. All rights reserved.
See https://www.cbica.upenn.edu/sbia/software/license.html or COPYING file.
Contact: SBIA Group <sbia-software at uphs.upenn.edu>
Definition in file executabletargetinfo.sh.
Function Documentation
function _executabletargetinfo_add |
( |
in |
key, |
|
|
in |
name, |
|
|
in |
value |
|
) |
| |
Add (key, value) pair to executable target info "hash".
- See also:
- _executabletargetinfo_get()
- Parameters:
-
[in] | key | Hash key. |
[in] | name | Name of the hash table. |
[in] | value | Value associated with the given hash key. |
- Returns:
- Sets a readonly variable that represents the (key, value) entry.
function _executabletargetinfo_get |
( |
in |
value, |
|
|
in |
key, |
|
|
in |
name |
|
) |
| |
Get value from executable target info "hash".
- See also:
- _executabletargetinfo_add()
- Parameters:
-
[out] | value | Value corresponding to given key or an empty string if key is unknown. |
[in] | key | Hash key. |
[in] | name | Name of the hash table. |
- Returns:
- Nothing.
- Return values:
-
0 | On success. |
1 | On failure. |
function _executabletargetinfo_initialize |
( |
| ) |
|
Initialize executable target information.
This function initializes the structures of information about the executable build targets. If this function is executed another time, it does nothing because the structures are initialized already. In order to reduce the start time of applications that do not make use of this module, the initialization is only performed on demand.
The initialization is done in get_target_uid() as this function is always called first before any lookup of information.
- Returns:
- Nothing.
- Return values:
-
0 | On success. |
1 | On failure. |
function _executabletargetinfo_sanitize |
( |
in |
out, |
|
|
in |
str |
|
) |
| |
Sanitize string for use in variable name.
- Parameters:
-
[out] | out | Sanitized string. |
[in] | str | String to be sanitized. |
- Returns:
- Nothing.
- Return values:
-
0 | On success. |
1 | On failure. |
function _executabletargetinfo_to_absolute_path |
( |
in |
simplified, |
|
|
in |
path, |
|
|
in |
base |
|
) |
| |
Make relative path absolute.
- Attention:
- The directory component of the path must be an existent directory.
- Todo:
- Implement this function without the use of cd such that non-existent paths can be simplified as well.
- Parameters:
-
[out] | simplified | Simplified path . |
[in] | path | Absolute or relative path. |
[in] | base | Base path used for relative paths. |
- Returns:
- Nothing.
- Return values:
-
0 | On success. |
1 | On failure. |