#! /bin/sh
# Print a version string.
-scriptversion=2013-12-05.23; # UTC
+scriptversion=2017-01-09.19; # UTC
# Bootstrap this package from checked-out sources.
-# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
-# 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
local_gl_dir=gl
+# Honor $PERL, but work even if there is none.
+PERL="${PERL-perl}"
+
me=$0
usage() {
done
}
-get_version() {
- app=$1
+get_version_sed='
+# Move version to start of line.
+s/.*[v ]\([0-9]\)/\1/
- $app --version >/dev/null 2>&1 || { $app --version; return 1; }
+# Skip lines that do not start with version.
+/^[0-9]/!d
+
+# Remove characters after the version.
+s/[^.a-z0-9-].*//
- $app --version 2>&1 |
- sed -n '# Move version to start of line.
- s/.*[v ]\([0-9]\)/\1/
+# The first component must be digits only.
+s/^\([0-9]*\)[a-z-].*/\1/
- # Skip lines that do not start with version.
- /^[0-9]/!d
+#the following essentially does s/5.005/5.5/
+s/\.0*\([1-9]\)/.\1/g
+p
+q'
- # Remove characters after the version.
- s/[^.a-z0-9-].*//
+get_version() {
+ app=$1
- # The first component must be digits only.
- s/^\([0-9]*\)[a-z-].*/\1/
+ $app --version >/dev/null 2>&1 || { $app --version; return 1; }
- #the following essentially does s/5.005/5.5/
- s/\.0*\([1-9]\)/.\1/g
- p
- q'
+ $app --version 2>&1 | sed -n "$get_version_sed"
}
check_versions() {
test "$appvar" = TAR && appvar=AMTAR
case $appvar in
GZIP) ;; # Do not use $GZIP: it contains gzip options.
+ PERL::*) ;; # Keep perl modules as-is
*) eval "app=\${$appvar-$app}" ;;
esac
ret=1
continue
} ;;
+ # Another check is for perl modules. These can be written as
+ # e.g. perl::XML::XPath in case of XML::XPath module, etc.
+ perl::*)
+ # Extract module name
+ app="${app#perl::}"
+ if ! $PERL -m"$app" -e 'exit 0' >/dev/null 2>&1; then
+ warn_ "Error: perl module '$app' not found"
+ ret=1
+ fi
+ continue
+ ;;
esac
if [ "$req_ver" = "-" ]; then
# Merely require app to exist; not all prereq apps are well-behaved
# Leave any existing symlink alone, if it already points to the source,
# so that broken build tools that care about symlink times
# aren't confused into doing unnecessary builds. Conversely, if the
- # existing symlink's time stamp is older than the source, make it afresh,
+ # existing symlink's timestamp is older than the source, make it afresh,
# so that broken tools aren't confused into skipping needed builds. See
# <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
test -h "$dst" &&
esac
fi
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
-$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
+$gnulib_tool $gnulib_tool_options --import $gnulib_modules \
+ || die "gnulib-tool failed"
for file in $gnulib_files; do
symlink_to_dir "$GNULIB_SRCDIR" $file \
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
# Bootstrap configuration.
-# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
-# 2015 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
hooks=$(cd scripts/git-hooks && git ls-files)
for f in $hooks; do
if [ -f .git/hooks/$f ]; then
- # If it is identical, skip it.
- cmp scripts/git-hooks/$f .git/hooks/$f > /dev/null \
- && continue
+ # If it is identical, skip it.
+ cmp scripts/git-hooks/$f .git/hooks/$f > /dev/null \
+ && continue
fi
cp --backup=numbered scripts/git-hooks/$f .git/hooks
chmod a-w .git/hooks/$f
#!/bin/sh
# Print a version string.
-scriptversion=2012-12-31.23; # UTC
+scriptversion=2017-01-09.19; # UTC
-# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
-# Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Options:
- --prefix prefix of git tags (default 'v')
- --fallback fallback version to use if \"git --version\" fails
+ --prefix PREFIX prefix of git tags (default 'v')
+ --fallback VERSION
+ fallback version to use if \"git --version\" fails
--help display this help and exit
--version output version information and exit
case $1 in
--help) echo "$usage"; exit 0;;
--version) echo "$version"; exit 0;;
- --prefix) shift; prefix="$1";;
- --fallback) shift; fallback="$1";;
+ --prefix) shift; prefix=${1?};;
+ --fallback) shift; fallback=${1?};;
-*)
echo "$0: Unknown option '$1'." >&2
echo "$0: Try '--help' for more information." >&2
# string we're using came from git. I.e., skip the test if it's "UNKNOWN"
# or if it came from .tarball-version.
if test "x$v_from_git" != x; then
- # Don't declare a version "dirty" merely because a time stamp has changed.
+ # Don't declare a version "dirty" merely because a timestamp has changed.
git update-index --refresh > /dev/null 2>&1
dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
fi
# Omit the trailing newline, so that m4_esyscmd can use the result directly.
-echo "$v" | tr -d "$nl"
+printf %s "$v"
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End: