diff options
author | root | 2013-02-27 22:19:53 +0100 |
---|---|---|
committer | root | 2013-02-27 22:19:53 +0100 |
commit | 83dcd2b34cefd5b324b5a4f54be141a858dc5238 (patch) | |
tree | d0b5db5602029646fe4af2e22891bed813406258 /remote/setup_tools | |
parent | tihi (diff) | |
download | tm-scripts-83dcd2b34cefd5b324b5a4f54be141a858dc5238.tar.gz tm-scripts-83dcd2b34cefd5b324b5a4f54be141a858dc5238.tar.xz tm-scripts-83dcd2b34cefd5b324b5a4f54be141a858dc5238.zip |
Generalization:
- Rework install_dependencies: make it a global function, not per tools.build
- Determine packet manager of local system (currently supports apt/dpkg and zypper/rpm)
- Look for packet manager specific tools.conf.$MANAGER first, use tools.conf otherwise
- Added list_package_files which should be used instead of "for $(dpkg -L | grep ...) ... >> ... done"
Diffstat (limited to 'remote/setup_tools')
-rwxr-xr-x | remote/setup_tools | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/remote/setup_tools b/remote/setup_tools index e96d8e2c..2af8abe5 100755 --- a/remote/setup_tools +++ b/remote/setup_tools @@ -27,12 +27,19 @@ read_config () unset REQUIRED_FILES unset REQUIRED_MODULES unset REQUIRED_PACKAGES + unset REQUIRED_DEPENDENCIES local TOOL_CONFIG="${TOOL_DIR}/${TOOL}/${TOOL}.conf" - [ ! -e "${TOOL_CONFIG}" ] && perror "Config for '$TOOL' not found." - - . "${TOOL_CONFIG}" || perror "Sourcing '${TOOL_CONFIG}' failed." + if [ -e "${TOOL_CONFIG}.${PACKET_MANAGER}" ]; then + # a specific tool.conf seems to exist, try to use that one + # TODO: Maybe move this down right after loading the generic one, to allow "overloading".... but might be a bit confusing + . "${TOOL_CONFIG}.${PACKET_MANAGER}" || perror "Sourcing '${TOOL_CONFIG}.${PACKET_MANAGER}' failed." + else + # otherwise, use the generic one + [ ! -e "${TOOL_CONFIG}" ] && perror "Config for '$TOOL' not found." + . "${TOOL_CONFIG}" || perror "Sourcing '${TOOL_CONFIG}' failed." + fi } read_build () |