Commit dd978439 authored by Axel Beckert's avatar Axel Beckert

dpt checkout: Only change directory if only one package has been checked out

parent 4d81430f
......@@ -30,19 +30,19 @@ dpt() {
ES=0
$REAL "$@" > "$TMP/pipe" || ES=$?
if egrep -q "^Updating existing checkout in .+" "$TMP/out"; then
if egrep -q "^Updating existing checkout in .+" "$TMP/out" && [ `egrep -c "^Updating existing checkout in .+" "$TMP/out"` = 1 ]; then
DIR=`egrep '^Updating existing' "$TMP/out" | sed -e 's/Updating existing checkout in //'`
cd "$DIR"
return $ES
fi
if egrep -q "^.+ ready in .+" "$TMP/out"; then
if egrep -q "^.+ ready in .+" "$TMP/out" && [ `egrep -c "^.+ ready in .+" "$TMP/out"` = 1 ]; then
DIR=`egrep ' ready in ' "$TMP/out" | sed -e 's/.\+ ready in //'`
cd "$DIR"
return $ES
fi
if egrep -q "^Package .+ is in .+" "$TMP/out"; then
if egrep -q "^Package .+ is in .+" "$TMP/out" && [ `egrep -c "^Package .+ is in .+" "$TMP/out"` = 1 ]; then
DIR=`egrep '^Package .+ is in ' "$TMP/out" | sed -e 's/^Package .\+ is in //'`
cd "$DIR"
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