summaryrefslogtreecommitdiffstats
path: root/remote/setup_tools
diff options
context:
space:
mode:
authorJonathan Bauer2013-02-05 17:29:01 +0100
committerJonathan Bauer2013-02-05 17:29:01 +0100
commit738ed47b2dd6981e99595001dd87c22e0f9f81df (patch)
tree297686182de9df499de52084e4203ca69c192597 /remote/setup_tools
parentimproved usage info (diff)
downloadtm-scripts-738ed47b2dd6981e99595001dd87c22e0f9f81df.tar.gz
tm-scripts-738ed47b2dd6981e99595001dd87c22e0f9f81df.tar.xz
tm-scripts-738ed47b2dd6981e99595001dd87c22e0f9f81df.zip
[setup_tools] check for locate
Diffstat (limited to 'remote/setup_tools')
-rwxr-xr-xremote/setup_tools14
1 files changed, 8 insertions, 6 deletions
diff --git a/remote/setup_tools b/remote/setup_tools
index ed6f58e9..091a63da 100755
--- a/remote/setup_tools
+++ b/remote/setup_tools
@@ -6,14 +6,15 @@ MODULE_DIR=${ROOT_DIR}/remote
TOOL_DIR=${MODULE_DIR}/tools
INIT_DIR=${MODULE_DIR}/stage3.2
-setup_git ()
+initial_checks ()
{
- if [ ! -z "${GIT}" ]; then
- GIT_BIN=$(which git)
- [ -z "${GIT_BIN}" ] && echo "Installing git..." && apt-get install git
- fi
+ for BIN in $(which git) $(which locate)
+ do
+ [ -z $BIN ] && echo "Installing $BIN..." && apt-get install $BIN
+ done
}
+
read_config ()
{
TOOL_CONFIG=${TOOL_DIR}/${TOOL}/${TOOL}.conf
@@ -165,6 +166,8 @@ get_basic_libs () {
generate_stage32 () {
+ initial_checks
+
# if no arguments assume all.
if [ "x$1" = "x" -o "x$1" = "xall" ]; then
tools=$(ls ${TOOL_DIR})
@@ -183,7 +186,6 @@ generate_stage32 () {
cd ${TOOL}
read_config
read_build
- setup_git
install_dependencies
fetch_source
build