From 1dcfa909b57a30a2329b67299a2e75d5190971b3 Mon Sep 17 00:00:00 2001 From: Christoph Niethammer Date: Mon, 2 May 2016 08:55:20 +0000 Subject: [PATCH] Indentation --- functions.sh | 82 ++++++++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/functions.sh b/functions.sh index 3d8bc81..eba7e1d 100644 --- a/functions.sh +++ b/functions.sh @@ -20,23 +20,23 @@ sit_countdown() { unpack() { - if [ ! -e ${SRC_POOL}/${A} ] ; then - sit_fail "${SRC_POOL}/${A} doesn't exist" - fi - case "${A##*.}" in - bz2) - tar xjf ${SRC_POOL}/${A} || sit_fail - ;; - gz|tgz) - tar xzf ${SRC_POOL}/${A} || sit_fail - ;; - xz) - tar xJf ${SRC_POOL}/${A} || sit_fail - ;; - *) - sit_fail "Archive format not recogized" - ;; - esac + if [ ! -e ${SRC_POOL}/${A} ] ; then + sit_fail "${SRC_POOL}/${A} doesn't exist" + fi + case "${A##*.}" in + bz2) + tar xjf ${SRC_POOL}/${A} || sit_fail + ;; + gz|tgz) + tar xzf ${SRC_POOL}/${A} || sit_fail + ;; + xz) + tar xJf ${SRC_POOL}/${A} || sit_fail + ;; + *) + sit_fail "Archive format not recogized" + ;; + esac } src_unpack() { unpack @@ -59,20 +59,20 @@ sit_prepare() { src_configure() { - if [ -x ${SRCDIR}/configure ] ; then + if [ -x ${SRCDIR}/configure ] ; then #sit_info "Runnning configure" - ${SRCDIR}/configure --prefix=$PREFIX $CONFIGURE_OPTS - if [ ! -z $LOGDIR -a -f config.log ] ; then - cp config.log $LOGDIR - fi - elif [ -f ${SRCDIR}/CMakeLists.txt ] ; then + ${SRCDIR}/configure --prefix=$PREFIX $CONFIGURE_OPTS + if [ ! -z $LOGDIR -a -f config.log ] ; then + cp config.log $LOGDIR + fi + elif [ -f ${SRCDIR}/CMakeLists.txt ] ; then #sit_info "Running cmake" - cmake -DCMAKE_INSTALL_PREFIX=$PREFIX $CMAKE_OPTS ${SRCDIR} - fi + cmake -DCMAKE_INSTALL_PREFIX=$PREFIX $CMAKE_OPTS ${SRCDIR} + fi } sit_configure() { sit_info "Configuring sources ..." - cd ${BUILDDIR} + cd ${BUILDDIR} src_configure || sit_fail "Configure failed" } @@ -82,7 +82,7 @@ src_build() { } sit_build() { sit_info "Building sources ..." - cd ${BUILDDIR} + cd ${BUILDDIR} src_build || sit_fail "Build failed" } @@ -98,7 +98,7 @@ sit_pretest() { src_install() { - make install + make install } sit_install() { sit_info "Installing package ..." @@ -144,17 +144,17 @@ sit_setperms() { } sit_sitinfo() { - local SIT_VERSION="unknown" - if svnversion $SIT_PATH >/dev/null 2>/dev/null && test "$(svnversion $SIT_PATH)" != "exported" ; then - SIT_VERSION="svn-r$(svnversion $SIT_PATH)" - elif cd $SIT_PATH; git svn find-rev r1 >/dev/null 2>&1 ; then - SIT_VERSION="svn-r$(cd $SIT_PATH; git svn find-rev HEAD)"; - fi - echo "Invocation: $(ps --pid $$ -o cmd | tail -n 1)" - echo "Started: $(date)" - echo "Version: $SIT_VERSION" - echo "Environment:" - echo "------------------------------------------------------------------------------" - env - echo "------------------------------------------------------------------------------" + local SIT_VERSION="unknown" + if svnversion $SIT_PATH >/dev/null 2>/dev/null && test "$(svnversion $SIT_PATH)" != "exported" ; then + SIT_VERSION="svn-r$(svnversion $SIT_PATH)" + elif cd $SIT_PATH; git svn find-rev r1 >/dev/null 2>&1 ; then + SIT_VERSION="svn-r$(cd $SIT_PATH; git svn find-rev HEAD)"; + fi + echo "Invocation: $(ps --pid $$ -o cmd | tail -n 1)" + echo "Started: $(date)" + echo "Version: $SIT_VERSION" + echo "Environment:" + echo "------------------------------------------------------------------------------" + env + echo "------------------------------------------------------------------------------" }