+# * Make it work recursivly on a directory.
+
+# Check for new enough bash version
+fail_old_bash() {
+ echo "Sorry your bash version is too old!"
+ echo "You need at least version 3.0 of bash."
+ echo "Please install a newer version:"
+ echo " * Either use your distro's packages."
+ echo " * Or see http://www.gnu.org/software/bash/"
+ exit 2
+}
+
+# Check bash version. We need at least 3.1
+# Lets not use anything like =~ here because
+# that may not work on old bash versions.
+if [[ "${BASH_VERSINFO[0]}" -lt 3 ]]; then
+ fail_old_bash
+fi