From patchwork Wed Feb 5 18:25:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 317235 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 7DE0D2C0084 for ; Thu, 6 Feb 2014 05:27:05 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id D1D8A8B0FD; Wed, 5 Feb 2014 18:27:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zGk5Bx8w8Npg; Wed, 5 Feb 2014 18:27:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 24D088B168; Wed, 5 Feb 2014 18:27:04 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id EDBA31BF9BE for ; Wed, 5 Feb 2014 18:27:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E84918B576 for ; Wed, 5 Feb 2014 18:27:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Assu4j9gyVet for ; Wed, 5 Feb 2014 18:27:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by whitealder.osuosl.org (Postfix) with ESMTPS id CFCA58AB62 for ; Wed, 5 Feb 2014 18:27:01 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id hi5so847463wib.14 for ; Wed, 05 Feb 2014 10:27:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=cJ6u7nGMHLgyRrnRzK0xb8RUh++pFLiaC4D2B8jXthg=; b=Wi0/CZznJpqEg+O++0o7bkhzoQHxxrS7/Ju8ATXx5nvtMVEU1IEW4ro8uxsUJsM7PJ H0vzACVi3EehHnVmI+WPX+uUq/ET4rrp8EYdDcrEZKDwHnqrAgD40SNXLy2/4Nw0mYXa ktBzs7dckAwCfZbjG9+Y3ip10+w1o7YUEYansNFExM+bn77cLWK8/0Z1BDFkeWxWi+7e cCX+/sxXokRRm3QAylVqVJen8qEv7Yb4kRdzdI7aFIuxXSoSI1l5ccTAsy2jBmJ5mjxg IbptP5VK5qaH2d8DMzUQc7aYVhI4LrDjzjYkeZ1rJP+vbNccSjbloE0QthAo9dRBbyHm Qn7Q== X-Received: by 10.194.82.105 with SMTP id h9mr2521901wjy.52.1391624820304; Wed, 05 Feb 2014 10:27:00 -0800 (PST) Received: from localhost (11-96-190-109.dsl.ovh.fr. [109.190.96.11]) by mx.google.com with ESMTPSA id ua8sm63408263wjc.4.2014.02.05.10.26.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 05 Feb 2014 10:26:59 -0800 (PST) From: Maxime Hadjinlian To: buildroot@busybox.net Date: Wed, 5 Feb 2014 19:25:49 +0100 Message-Id: <1391624749-17039-1-git-send-email-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 1.8.5.3 Subject: [Buildroot] [PATCH v2] dependencies.sh: cleanup dependencies.sh X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Cleanup mixed indents and remove commented lines. Signed-off-by: Maxime Hadjinlian --- Changes v1 -> v2: - The cleanup does not remove the indent in the if block anymore --- support/dependencies/dependencies.sh | 119 +++++++++++++++++------------------ 1 file changed, 59 insertions(+), 60 deletions(-) diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh index 47d4d10..4b3e9a9 100755 --- a/support/dependencies/dependencies.sh +++ b/support/dependencies/dependencies.sh @@ -1,6 +1,5 @@ #!/bin/sh # vi: set sw=4 ts=4: -#set -x export LC_ALL=C @@ -44,12 +43,12 @@ if test -n "$PATH" ; then fi; if test -n "$PERL_MM_OPT" ; then - echo - echo "You have PERL_MM_OPT defined because Perl local::lib" - echo "is installed on your system. Please unset this variable" - echo "before starting Buildroot, otherwise the compilation of" - echo "Perl related packages will fail" - exit 1 + echo + echo "You have PERL_MM_OPT defined because Perl local::lib" + echo "is installed on your system. Please unset this variable" + echo "before starting Buildroot, otherwise the compilation of" + echo "Perl related packages will fail" + exit 1 fi # Verify that which is installed @@ -117,10 +116,10 @@ CXXCOMPILER=$(which $HOSTCXX_NOCCACHE 2> /dev/null) if [ -z "$CXXCOMPILER" ] ; then CXXCOMPILER=$(which c++ 2> /dev/null) fi + if [ -z "$CXXCOMPILER" ] ; then echo echo "You may have to install 'g++' on your build machine" - #exit 1 fi if [ ! -z "$CXXCOMPILER" ] ; then CXXCOMPILER_VERSION=$($CXXCOMPILER -v 2>&1 | sed -n '/^gcc version/p' | @@ -149,77 +148,77 @@ fi; # Check that a few mandatory programs are installed missing_progs="no" for prog in patch perl tar wget cpio python unzip rsync bc ${DL_TOOLS} ; do - if ! which $prog > /dev/null ; then - echo "You must install '$prog' on your build machine"; - missing_progs="yes" - if test $prog = "svn" ; then - echo " svn is usually part of the subversion package in your distribution" - elif test $prog = "hg" ; then - echo " hg is usually part of the mercurial package in your distribution" - elif test $prog = "zcat" ; then - echo " zcat is usually part of the gzip package in your distribution" - elif test $prog = "bzcat" ; then - echo " bzcat is usually part of the bzip2 package in your distribution" + if ! which $prog > /dev/null ; then + echo "You must install '$prog' on your build machine"; + missing_progs="yes" + if test $prog = "svn" ; then + echo " svn is usually part of the subversion package in your distribution" + elif test $prog = "hg" ; then + echo " hg is usually part of the mercurial package in your distribution" + elif test $prog = "zcat" ; then + echo " zcat is usually part of the gzip package in your distribution" + elif test $prog = "bzcat" ; then + echo " bzcat is usually part of the bzip2 package in your distribution" + fi fi - fi done if test "${missing_progs}" = "yes" ; then - exit 1 + exit 1 fi if grep ^BR2_TOOLCHAIN_BUILDROOT=y $BUILDROOT_CONFIG > /dev/null && \ - grep ^BR2_ENABLE_LOCALE=y $BUILDROOT_CONFIG > /dev/null ; then - if ! which locale > /dev/null ; then - echo - echo "You need locale support on your build machine to build a toolchain supporting locales" - exit 1 ; - fi - if ! locale -a | grep -q -i utf8$ ; then - echo - echo "You need at least one UTF8 locale to build a toolchain supporting locales" - exit 1 ; - fi + grep ^BR2_ENABLE_LOCALE=y $BUILDROOT_CONFIG > /dev/null ; then + if ! which locale > /dev/null ; then + echo + echo "You need locale support on your build machine to build a toolchain supporting locales" + exit 1 ; + fi + if ! locale -a | grep -q -i utf8$ ; then + echo + echo "You need at least one UTF8 locale to build a toolchain supporting locales" + exit 1 ; + fi fi if grep -q ^BR2_PACKAGE_CLASSPATH=y $BUILDROOT_CONFIG ; then - for prog in javac jar; do - if ! which $prog > /dev/null ; then - echo >&2 - echo "You must install '$prog' on your build machine" >&2 - exit 1 - fi - done + for prog in javac jar; do + if ! which $prog > /dev/null ; then + echo >&2 + echo "You must install '$prog' on your build machine" >&2 + exit 1 + fi + done fi if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BUILDROOT_CONFIG ; then - if test ! -f /lib/ld-linux.so.2 ; then - echo - echo "Your Buildroot configuration uses pre-built tools for the x86 architecture," - echo "but your build machine uses the x86-64 architecture without the 32 bits compatibility" - echo "library." - echo "If you're running a Debian/Ubuntu distribution, install the libc6:i386," - echo "libstdc++6:i386, and zlib1g:i386 packages." - echo "For other distributions, refer to the documentation on how to install the 32 bits" - echo "compatibility libraries." - exit 1 - fi + if test ! -f /lib/ld-linux.so.2 ; then + echo + echo "Your Buildroot configuration uses pre-built tools for the x86 architecture," + echo "but your build machine uses the x86-64 architecture without the 32 bits compatibility" + echo "library." + echo "If you're running a Debian/Ubuntu distribution, install the libc6:i386," + echo "libstdc++6:i386, and zlib1g:i386 packages." + echo "For other distributions, refer to the documentation on how to install the 32 bits" + echo "compatibility libraries." + exit 1 + fi fi if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BUILDROOT_CONFIG ; then - if ! echo "int main(void) {}" | gcc -m32 -x c - ; then - echo - echo "Your Buildroot configuration needs a compiler capable of building 32 bits binaries." - echo "If you're running a Debian/Ubuntu distribution, install the gcc-multilib package." - echo "For other distributions, refer to their documentation." - exit 1 - fi + if ! echo "int main(void) {}" | gcc -m32 -x c - ; then + echo + echo "Your Buildroot configuration needs a compiler capable of building 32 bits binaries." + echo "If you're running a Debian/Ubuntu distribution, install the gcc-multilib package." + echo "For other distributions, refer to their documentation." + exit 1 + fi fi # Check that the Perl installation is complete enough to build # host-autoconf. if ! perl -e "require Data::Dumper" > /dev/null 2>&1 ; then - echo "Your Perl installation is not complete enough, at least Data::Dumper is missing." - echo "On Debian/Ubuntu distributions, install the 'perl' package." - exit 1 + echo "Your Perl installation is not complete enough, at least Data::Dumper is missing." + echo "On Debian/Ubuntu distributions, install the 'perl' package." + exit 1 fi