Lines Matching +full:g +full:- +full:link

3 # This script is a wrapper for programs that may have alternate versions (e.g. python2, python3).  This
5 # name>_VERSION (e.g. PYTHON_VERSION, ROBOT_VERSION, etc.) environment variable.
7 # Users would be expected to create a link with the base name of the program that points to this file.
10 # cd openbmc-test-automation/bin
11 # ln -s select_version python
13 # The PATH variable should contain the expanded path to openbmc-test-automation/bin.
17 # to the name of the program (e.g. if PYTHON_VERSION = "3", then python3 will be used.). If <program
28 local target_program_path_var="${1:-target_program_path}" ; shift
47 # The typical use of this program would be to create a link to it like this:
48 # ln -s select_version python
49 # That being the case, get the name of this actual program (rather than the name of the link to it).
50 base_program_path=$(readlink -f "${0}")
55 echo -n "**ERROR** ${base_program_name} should never be called directly."
61 # Compose the version_var_name value (e.g. PYTHON_VERSION).
63 # Compose the alternate_program_name (e.g. python3).
66 # Now use the "type" built-in to search the PATH variable for a list of target program candidates.
67 candidates=$(type -ap ${alternate_program_name})
70 # /home/robot/openbmc-test-automation/bin/python
73 # In this example, the first candidate is actually a link to
74 # /home/robot/openbmc-test-automation/bin/select_version. As such it will be rejected.
78 if [ -L "${candidate}" ] ; then
79 # The candidate is a link so we need to see if it's a link to this program file.
84 # The candidate is NOT a link so it qualifies as the desired target program path.
97 # Compose program path var name (e.g. PYTHON_PGM_PATH).
99 # Set and export pgm_path_var_name (e.g. PYTHON_PGM_PATH=/usr/bin/python3). This value can be used by
103 if [ "${1}" == "--print_only" ] ; then