From 0b2de42a414edfd21564c33c0ec74baa94ca96ef Mon Sep 17 00:00:00 2001 From: Byteflux Date: Fri, 17 Apr 2015 03:05:37 -0700 Subject: [PATCH] Better msysgit support in rebuildPatches --- rebuildPatches.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rebuildPatches.sh b/rebuildPatches.sh index 78455d55c5e..268aef04ae4 100755 --- a/rebuildPatches.sh +++ b/rebuildPatches.sh @@ -12,7 +12,12 @@ function cleanupPatches { testver=$(echo "$diffs" | tail -n 2 | grep -ve "^$" | tail -n 1 | grep "$gitver") if [ "x$testver" != "x" ]; then - diffs=$(echo "$diffs" | head -n -2) + mingw=$(uname -s | grep "MINGW") + if [ "x$mingw" != "x" ]; then + diffs=$(echo "$diffs" | head -n $(($(echo "$diffs" | wc -l | sed -r 's/^ +//' | cut -d ' ' -f 1) - 2))) + else + diffs=$(echo "$diffs" | head -n -2) + fi fi