diff options
author | Jonathan Bauer | 2013-10-15 14:00:33 +0200 |
---|---|---|
committer | Jonathan Bauer | 2013-10-15 14:00:33 +0200 |
commit | 326953ed18f1f6ec11887293181ba9aa64376537 (patch) | |
tree | 400372feb256df46376e0d96b00c6e3f07ea1bd8 /mltk | |
parent | Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts (diff) | |
download | tm-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-x | mltk | 25 |
1 files changed, 18 insertions, 7 deletions
@@ -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() { |