-# install Lustre Git commit hooks by default - LU-2083
-for HOOK in commit-msg prepare-commit-msg; do
- [ -e .git/hooks/$HOOK ] || ln -sf ../build/$HOOK .git/hooks/
-done
-
-# taken from gnome-common/macros2/autogen.sh
-compare_versions() {
- ch_min_version=$1
- ch_actual_version=$2
- ch_status=0
- IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="."
- set $ch_actual_version
- for ch_min in $ch_min_version; do
- # remove letter suffixes
- ch_cur=$(echo $1 | sed 's/[^0-9].*$//'); shift
- if [ -z "$ch_min" ]; then break; fi
- if [ -z "$ch_cur" ]; then ch_status=1; break; fi
- if [ $ch_cur -gt $ch_min ]; then break; fi
- if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi
- done
- IFS="$ch_save_IFS"
- return $ch_status
-}
-
-error_msg() {
- echo "$cmd is $1. Version $required (or higher) is"\
- " required to build Lustre."
-
- if [ ! -x /usr/bin/lsb_release ]; then
- echo "lsb_release could not be found. "\
- "If it were available more help on how to resolve this"
- echo "situation would be available."
- exit 1
- fi
-
- local dist_id="$(lsb_release -is)"
- local howto=""
- howto() {
- echo -e "To install $cmd, you can use the command:\n# $1"
- }
- case $dist_id in
- Ubuntu|Debian) howto "apt-get install $cmd" ;;
- CentOS|RedHat*|Fedora*) howto "yum install $cmd" ;;
- SUSE*) howto "yast -i $cmd" ;;
- *) cat <<EOF
-Installation instructions for the package $cmd on $dist_id are not known.
-If you know how to install the required package, please file a bug at
-http://bugs.whamcloud.com/ and include your distribution and the output from:
-"lsb_release -is" is: "$dist_id"
-EOF
- ;;
- esac
-