summaryrefslogtreecommitdiffstats
path: root/mltk
diff options
context:
space:
mode:
authorJonathan Bauer2013-10-15 14:00:33 +0200
committerJonathan Bauer2013-10-15 14:00:33 +0200
commit326953ed18f1f6ec11887293181ba9aa64376537 (patch)
tree400372feb256df46376e0d96b00c6e3f07ea1bd8 /mltk
parentMerge branch 'master' of git.openslx.org:openslx-ng/tm-scripts (diff)
downloadtm-scripts-326953ed18f1f6ec11887293181ba9aa64376537.tar.gz
tm-scripts-326953ed18f1f6ec11887293181ba9aa64376537.tar.xz
tm-scripts-326953ed18f1f6ec11887293181ba9aa64376537.zip
[mltk] prints missing dev tools. Depending on distro print the possible package list.
Diffstat (limited to 'mltk')
-rwxr-xr-xmltk25
1 files changed, 18 insertions, 7 deletions
diff --git a/mltk b/mltk
index d6380a03..6a7ad23e 100755
--- a/mltk
+++ b/mltk
@@ -102,14 +102,25 @@ print_usage() {
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 pkg-config qmake" # '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; }
+ local DEV_TOOLS="gcc c++ g++ make m4 strip git depmod patch mksquashfs pkg-config qmake" # 'strip' as marker for binutils
+
+ # DEV_CHECK marks missing dev-tools
+ local DEV_TOOLS_MISSING=""
+ for i in $DEV_TOOLS; do
+ which "$i" 2>/dev/null 1>&2 || DEV_TOOLS_MISSING+="$i "
done
-
- # TODO make the script install the dev-stuff automaticly.
- # Ubuntu: 'build-essential', 'm4', 'squashfs-tools'
- # OpenSUSE: ???
+
+ if [ -n "$DEV_TOOLS_MISSING" ]; then
+ pinfo "You appear to be missing following development tools."
+ pinfo "Missing tools are: $DEV_TOOLS_MISSING"
+ pinfo "For $SYS_DISTRIBUTION you probably need to run:"
+ case $SYS_DISTRIBUTION in
+ pinfo "apt-get install build-essential m4 squashfs-tools" ;;
+ opensuse) pinfo "zypper install -t pattern devel_basis" ;;
+ *) perror "Cannot determine SYS_DISTRIBUTION: $SYS_DISTRIBUTION unknown!" ;;
+ esac
+
+ fi
}
initial_checks() {