Indentation
This commit is contained in:
parent
1ad253394b
commit
1dcfa909b5
1 changed files with 41 additions and 41 deletions
82
functions.sh
82
functions.sh
|
@ -20,23 +20,23 @@ sit_countdown() {
|
||||||
|
|
||||||
|
|
||||||
unpack() {
|
unpack() {
|
||||||
if [ ! -e ${SRC_POOL}/${A} ] ; then
|
if [ ! -e ${SRC_POOL}/${A} ] ; then
|
||||||
sit_fail "${SRC_POOL}/${A} doesn't exist"
|
sit_fail "${SRC_POOL}/${A} doesn't exist"
|
||||||
fi
|
fi
|
||||||
case "${A##*.}" in
|
case "${A##*.}" in
|
||||||
bz2)
|
bz2)
|
||||||
tar xjf ${SRC_POOL}/${A} || sit_fail
|
tar xjf ${SRC_POOL}/${A} || sit_fail
|
||||||
;;
|
;;
|
||||||
gz|tgz)
|
gz|tgz)
|
||||||
tar xzf ${SRC_POOL}/${A} || sit_fail
|
tar xzf ${SRC_POOL}/${A} || sit_fail
|
||||||
;;
|
;;
|
||||||
xz)
|
xz)
|
||||||
tar xJf ${SRC_POOL}/${A} || sit_fail
|
tar xJf ${SRC_POOL}/${A} || sit_fail
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
sit_fail "Archive format not recogized"
|
sit_fail "Archive format not recogized"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
src_unpack() {
|
src_unpack() {
|
||||||
unpack
|
unpack
|
||||||
|
@ -59,20 +59,20 @@ sit_prepare() {
|
||||||
|
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
if [ -x ${SRCDIR}/configure ] ; then
|
if [ -x ${SRCDIR}/configure ] ; then
|
||||||
#sit_info "Runnning configure"
|
#sit_info "Runnning configure"
|
||||||
${SRCDIR}/configure --prefix=$PREFIX $CONFIGURE_OPTS
|
${SRCDIR}/configure --prefix=$PREFIX $CONFIGURE_OPTS
|
||||||
if [ ! -z $LOGDIR -a -f config.log ] ; then
|
if [ ! -z $LOGDIR -a -f config.log ] ; then
|
||||||
cp config.log $LOGDIR
|
cp config.log $LOGDIR
|
||||||
fi
|
fi
|
||||||
elif [ -f ${SRCDIR}/CMakeLists.txt ] ; then
|
elif [ -f ${SRCDIR}/CMakeLists.txt ] ; then
|
||||||
#sit_info "Running cmake"
|
#sit_info "Running cmake"
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX $CMAKE_OPTS ${SRCDIR}
|
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX $CMAKE_OPTS ${SRCDIR}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
sit_configure() {
|
sit_configure() {
|
||||||
sit_info "Configuring sources ..."
|
sit_info "Configuring sources ..."
|
||||||
cd ${BUILDDIR}
|
cd ${BUILDDIR}
|
||||||
src_configure || sit_fail "Configure failed"
|
src_configure || sit_fail "Configure failed"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ src_build() {
|
||||||
}
|
}
|
||||||
sit_build() {
|
sit_build() {
|
||||||
sit_info "Building sources ..."
|
sit_info "Building sources ..."
|
||||||
cd ${BUILDDIR}
|
cd ${BUILDDIR}
|
||||||
src_build || sit_fail "Build failed"
|
src_build || sit_fail "Build failed"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ sit_pretest() {
|
||||||
|
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
make install
|
make install
|
||||||
}
|
}
|
||||||
sit_install() {
|
sit_install() {
|
||||||
sit_info "Installing package ..."
|
sit_info "Installing package ..."
|
||||||
|
@ -144,17 +144,17 @@ sit_setperms() {
|
||||||
}
|
}
|
||||||
|
|
||||||
sit_sitinfo() {
|
sit_sitinfo() {
|
||||||
local SIT_VERSION="unknown"
|
local SIT_VERSION="unknown"
|
||||||
if svnversion $SIT_PATH >/dev/null 2>/dev/null && test "$(svnversion $SIT_PATH)" != "exported" ; then
|
if svnversion $SIT_PATH >/dev/null 2>/dev/null && test "$(svnversion $SIT_PATH)" != "exported" ; then
|
||||||
SIT_VERSION="svn-r$(svnversion $SIT_PATH)"
|
SIT_VERSION="svn-r$(svnversion $SIT_PATH)"
|
||||||
elif cd $SIT_PATH; git svn find-rev r1 >/dev/null 2>&1 ; then
|
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)";
|
SIT_VERSION="svn-r$(cd $SIT_PATH; git svn find-rev HEAD)";
|
||||||
fi
|
fi
|
||||||
echo "Invocation: $(ps --pid $$ -o cmd | tail -n 1)"
|
echo "Invocation: $(ps --pid $$ -o cmd | tail -n 1)"
|
||||||
echo "Started: $(date)"
|
echo "Started: $(date)"
|
||||||
echo "Version: $SIT_VERSION"
|
echo "Version: $SIT_VERSION"
|
||||||
echo "Environment:"
|
echo "Environment:"
|
||||||
echo "------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------"
|
||||||
env
|
env
|
||||||
echo "------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue