[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/gpg4win/scripts/debian-xcompile
From: Andre Heinecke <aheinecke () intevation ! de>
Date: 2012-12-07 8:47:48
Message-ID: 20121207084748.C9663AC867 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1327604 by aheinecke:
Fix check_git and enable optional logging to file
M +9 -2 functions
--- branches/work/gpg4win/scripts/debian-xcompile/functions #1327603:1327604
@@ -13,15 +13,22 @@
function run() {
msg -n "${1} : "
shift
- msg "$@"
+ msg -n "$@ ..."
local OUTPUT
+ if [ -n "$LOGFILE" ]; then
+ set -o pipefail
+ OUTPUT="$("$@" 2>&1 | tee -a $LOGFILE)"
+ else
OUTPUT="$("$@" 2>&1)"
+ fi
+
if [ $? -ne 0 ] ; then
msg failed
[ -z "$OUTPUT" ] || msg "$OUTPUT"
die
fi
msg done
+ set +o pipefail
}
function ask() {
@@ -99,7 +106,7 @@
function check_git() {
local DIR="$1" URL="$2" BRANCH="$3"
- if [ -n $BRANCH ]; then
+ if [ -z $BRANCH ]; then
BRANCH=master
fi
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic