aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/incremental-git-filterbranch.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/incremental-git-filterbranch.sh b/bin/incremental-git-filterbranch.sh
index 6bb965f..1105e07 100755
--- a/bin/incremental-git-filterbranch.sh
+++ b/bin/incremental-git-filterbranch.sh
@@ -250,12 +250,23 @@ checkEnvironment () {
fi
if ! command -v cut >/dev/null
then
- die 'The required grep command is not available.'
+ die 'The required cut command is not available.'
+ fi
+ if ! command -v sort >/dev/null
+ then
+ die 'The required sort command is not available.'
fi
if ! command -v md5sum >/dev/null
then
die 'The required md5sum command is not available.'
fi
+ checkEnvironment_vMin='2.15.0'
+ checkEnvironment_vCur=$(git --version | cut -d ' ' -f3)
+ checkEnvironment_vWork=$(printf "${checkEnvironment_vCur}\n${checkEnvironment_vMin}" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)
+ if test "${checkEnvironment_vWork}" != "${checkEnvironment_vMin}"
+ then
+ die "This script requires git ${checkEnvironment_vMin} (you have git ${checkEnvironment_vWork})."
+ fi
}

© 2014-2020 Faster IT GmbH | imprint | privacy policy