Fix: Cannot use -r on OSX, replacing

This commit is contained in:
Knut Ahlers 2016-10-24 08:20:44 +02:00
parent 17099e5dfe
commit 5ab4584eb2
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E

View File

@ -25,4 +25,6 @@ for branch in $(git branch --merged | grep -v '^*'); do
done
step "Removing local branches where remote branch is gone..."
git branch -vv | awk '/: gone]/{print $1}' | xargs -r git branch -D
if ( git branch -vv | grep -q ': gone ]' ); then
git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D
fi