#!/bin/bash cd "$( dirname "$0" )" ARGS="" DIST="$(rpmdist.sh --dist)" # CCACHE related stuff if [ ! -d /var/cache/ccache ]; then [ -z "${DIST}" ] && DIST="$(rpm -E "%{dist}")" if [ -n "${DIST}" ]; then export CCACHE_DIR=~/.ccache${DIST}.$(uname -m) fi fi while [ $# -gt 0 ]; do case "$1" in "--auto"|"-a") AUTO=1;; "--version"|"-v") REQVERSION="$2"; shift;; "--"*) ARGS="${ARGS} $1";; *) COMP="${1%%/}";; esac shift done if [ -d ~/tde/tde-tarballs/${REQVERSION} ]; then eval TARBALLS_DIR=~/tde/tde-tarballs/${REQVERSION} else eval TARBALLS_DIR=~/tde/tde-tarballs/3.5.13.2 #eval TARBALLS_DIR=~/tde/tde-tarballs/14.0.0 fi clear cat <&1 | tee ${LOGFILE} eval "$(grep ^RET= ${LOGFILE})" set +x # Removes temporary source directory rm -rf "${SOURCEDIR}" if [ "${RET}" -gt 0 ]; then exit ${RET} fi if grep -q "error: Failed build dependencies:" ${LOGFILE}; then # DEPS=$( sed -n -e "/.* is needed by .*/ s/^[ \t]*\([a-zA-Z2-9_-]*\) .*/\1/p" ${LOGFILE} ) set $( grep " is needed by " ${LOGFILE} | cut -d " " -f1 ) exit 2 fi rm -rf "${SOURCEDIR}" # Removes BUILDDIR if build succeeded rm -rf "${BUILDDIR}/"*${COMP##*/}-${VERSION}*