summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2013-08-21 13:46:16 +0200
committerSimon Rettberg2013-08-21 13:46:16 +0200
commitbddd84a57d501a57aa6cc67bbc71c16ff3e9e654 (patch)
tree68ebf72c8f0de934aa6e2f11c4d5d49cab99a8b8
parent[remote] Renamed functions to functions.inc; make setup-addons not fail if no... (diff)
parent[mltk] Script: New Function 'check-devtools', check for devtools now (diff)
downloadtm-scripts-bddd84a57d501a57aa6cc67bbc71c16ff3e9e654.tar.gz
tm-scripts-bddd84a57d501a57aa6cc67bbc71c16ff3e9e654.tar.xz
tm-scripts-bddd84a57d501a57aa6cc67bbc71c16ff3e9e654.zip
Merge branch 'master' of simonslx:openslx-ng/tm-scripts
-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