Commit b38a8c38 authored by Damyan Ivanov's avatar Damyan Ivanov

parse output of failing commands too

Even if gbp-pull fails, we could still cd into the
package directory
parent 8856d408
......@@ -25,25 +25,23 @@ dpt() {
ES=0
$REAL "$@" > "$TMP/pipe" || ES=$?
[ "$ES" = "0" ] || return $ES
if egrep -q "^Updating existing checkout in .+" "$TMP/out"; then
DIR=`egrep '^Updating existing' "$TMP/out" | sed -e 's/Updating existing checkout in //'`
cd "$DIR"
return 0
return $ES
fi
if egrep -q "^.+ ready in .+" "$TMP/out"; then
DIR=`egrep ' ready in ' "$TMP/out" | sed -e 's/.\+ ready in //'`
cd "$DIR"
return 0
return $ES
fi
if egrep -q "^Package .+ is in .+" "$TMP/out"; then
DIR=`egrep '^Package .+ is in ' "$TMP/out" | sed -e 's/^Package .\+ is in //'`
cd "$DIR"
return 0
return $ES
fi
return 0
return $ES
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment