summaryrefslogtreecommitdiffstats
path: root/remote/setup_tools
diff options
context:
space:
mode:
authorroot2013-02-27 22:19:53 +0100
committerroot2013-02-27 22:19:53 +0100
commit83dcd2b34cefd5b324b5a4f54be141a858dc5238 (patch)
treed0b5db5602029646fe4af2e22891bed813406258 /remote/setup_tools
parenttihi (diff)
downloadtm-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-xremote/setup_tools13
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 ()