summaryrefslogtreecommitdiffstats
path: root/mltk
diff options
context:
space:
mode:
authorChristian Rößler2013-08-21 13:39:13 +0200
committerChristian Rößler2013-08-21 13:39:13 +0200
commit010bdb776fa495a1fdd317ea43e622847fe712d7 (patch)
tree5562ad3c66307a55e79962a606ead23755fa2ab0 /mltk
parent[export_target] Fix creation of squashFS (diff)
downloadtm-scripts-010bdb776fa495a1fdd317ea43e622847fe712d7.tar.gz
tm-scripts-010bdb776fa495a1fdd317ea43e622847fe712d7.tar.xz
tm-scripts-010bdb776fa495a1fdd317ea43e622847fe712d7.zip
[mltk] Script: New Function 'check-devtools', check for devtools now
later in running to not impede script help (when invoked witout or wrong parameters).
Diffstat (limited to 'mltk')
-rwxr-xr-xmltk19
1 files changed, 12 insertions, 7 deletions
diff --git a/mltk b/mltk
index 24de8d33..73de3601 100755
--- a/mltk
+++ b/mltk
@@ -20,13 +20,6 @@ SELF="$(readlink -f $0)"
ROOT_DIR="$(dirname "${SELF}")"
MLTK_PID="$$"
-# Checking for needed development tools, compilers etc.
-# Required: m4 make gcc g++ binutils
-DEVTOOLS="gcc c++ g++ make m4 strip git depmod patch mksquashfs" # 'strip' as marker for binutils
-for i in $DEVTOOLS; do
- which "$i" 2>/dev/null 1>&2 || { echo "Essential development tool $i not found - exiting."; exit 1; }
-done
-
# Make apt-get install non-interactive when it comes to postinstall questions
# ie. kdm asking which dm you want to set as default
export DEBIAN_FRONTEND=noninteractive
@@ -94,6 +87,16 @@ print_usage() {
echo -e ""
}
+
+check_devtools() {
+ # Checking for needed development tools, compilers etc.
+ # Required: m4 make gcc g++ binutils
+ DEVTOOLS="gcc c++ g++ make m4 strip git depmod patch mksquashfs" # 'strip' as marker for binutils
+ for i in $DEVTOOLS; do
+ which "$i" 2>/dev/null 1>&2 || { echo "Essential development tool $i not found - exiting."; exit 1; }
+ done
+}
+
initial_checks() {
if [ "x$(whoami)" != "xroot" ]; then
perror "ERROR: You need to have root rights to install packages."
@@ -284,4 +287,6 @@ REMOTE_AUTOMATIC_BUILD=0
initial_checks
read_params $@
+check_devtools
+
run