mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
bootstrap: update from gnulib.
This commit is contained in:
parent
74f6cb8884
commit
959e5d1e90
@ -1,3 +1,7 @@
|
|||||||
|
2012-09-20 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||||
|
|
||||||
|
* bootstrap: Update from gnulib.
|
||||||
|
|
||||||
2012-09-02 Nguyễn Thái Ngọc Duy <pclouds@gmail.com> (tiny change)
|
2012-09-02 Nguyễn Thái Ngọc Duy <pclouds@gmail.com> (tiny change)
|
||||||
|
|
||||||
* po/POTFILES.in: Add more files.
|
* po/POTFILES.in: Add more files.
|
||||||
|
49
bootstrap
49
bootstrap
@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Print a version string.
|
# Print a version string.
|
||||||
scriptversion=2012-07-06.11; # UTC
|
scriptversion=2012-07-19.14; # UTC
|
||||||
|
|
||||||
# Bootstrap this package from checked-out sources.
|
# Bootstrap this package from checked-out sources.
|
||||||
|
|
||||||
@ -77,15 +77,32 @@ Running without arguments will suffice in most cases.
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
warn()
|
# warnf_ FORMAT-STRING ARG1...
|
||||||
|
warnf_ ()
|
||||||
{
|
{
|
||||||
for i
|
warnf_format_=$1
|
||||||
do
|
shift
|
||||||
echo "$i"
|
nl='
|
||||||
done | sed -e "s/^/$me: /" >&2
|
'
|
||||||
|
case $* in
|
||||||
|
*$nl*) me_=$(printf "$me"|tr "$nl|" '??')
|
||||||
|
printf "$warnf_format_" "$@" | sed "s|^|$me_: |" ;;
|
||||||
|
*) printf "$me: $warnf_format_" "$@" ;;
|
||||||
|
esac >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
die() { warn "$@"; exit 1; }
|
# warn_ WORD1...
|
||||||
|
warn_ ()
|
||||||
|
{
|
||||||
|
# If IFS does not start with ' ', set it and emit the warning in a subshell.
|
||||||
|
case $IFS in
|
||||||
|
' '*) warnf_ '%s\n' "$*";;
|
||||||
|
*) (IFS=' '; warn_ "$@");;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# die WORD1...
|
||||||
|
die() { warn_ "$@"; exit 1; }
|
||||||
|
|
||||||
# Configuration.
|
# Configuration.
|
||||||
|
|
||||||
@ -197,6 +214,8 @@ use_git=true
|
|||||||
# otherwise find the first of the NAMES that can be run (i.e.,
|
# otherwise find the first of the NAMES that can be run (i.e.,
|
||||||
# supports --version). If found, set ENVVAR to the program name,
|
# supports --version). If found, set ENVVAR to the program name,
|
||||||
# die otherwise.
|
# die otherwise.
|
||||||
|
#
|
||||||
|
# FIXME: code duplication, see also gnu-web-doc-update.
|
||||||
find_tool ()
|
find_tool ()
|
||||||
{
|
{
|
||||||
find_tool_envvar=$1
|
find_tool_envvar=$1
|
||||||
@ -335,8 +354,7 @@ grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \
|
|||||||
grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
|
grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
|
||||||
>/dev/null && found_aux_dir=yes
|
>/dev/null && found_aux_dir=yes
|
||||||
test $found_aux_dir = yes \
|
test $found_aux_dir = yes \
|
||||||
|| die "expected line not found in configure.ac. Add the following:" \
|
|| die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it"
|
||||||
" AC_CONFIG_AUX_DIR([$build_aux])"
|
|
||||||
|
|
||||||
# If $build_aux doesn't exist, create it now, otherwise some bits
|
# If $build_aux doesn't exist, create it now, otherwise some bits
|
||||||
# below will malfunction. If creating it, also mark it as ignored.
|
# below will malfunction. If creating it, also mark it as ignored.
|
||||||
@ -442,7 +460,7 @@ check_versions() {
|
|||||||
automake-ng|aclocal-ng)
|
automake-ng|aclocal-ng)
|
||||||
app=${app%-ng}
|
app=${app%-ng}
|
||||||
($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || {
|
($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || {
|
||||||
warn "Error: '$app' not found or not from Automake-NG"
|
warn_ "Error: '$app' not found or not from Automake-NG"
|
||||||
ret=1
|
ret=1
|
||||||
continue
|
continue
|
||||||
} ;;
|
} ;;
|
||||||
@ -452,20 +470,21 @@ check_versions() {
|
|||||||
# so we have to rely on $? rather than get_version.
|
# so we have to rely on $? rather than get_version.
|
||||||
$app --version >/dev/null 2>&1
|
$app --version >/dev/null 2>&1
|
||||||
if [ 126 -le $? ]; then
|
if [ 126 -le $? ]; then
|
||||||
warn "Error: '$app' not found"
|
warn_ "Error: '$app' not found"
|
||||||
ret=1
|
ret=1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Require app to produce a new enough version string.
|
# Require app to produce a new enough version string.
|
||||||
inst_ver=$(get_version $app)
|
inst_ver=$(get_version $app)
|
||||||
if [ ! "$inst_ver" ]; then
|
if [ ! "$inst_ver" ]; then
|
||||||
warn "Error: '$app' not found"
|
warn_ "Error: '$app' not found"
|
||||||
ret=1
|
ret=1
|
||||||
else
|
else
|
||||||
latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
|
latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
|
||||||
if [ ! "$latest_ver" = "$inst_ver" ]; then
|
if [ ! "$latest_ver" = "$inst_ver" ]; then
|
||||||
warn "Error: '$app' version == $inst_ver is too old" \
|
warnf_ '%s\n' \
|
||||||
" '$app' version >= $req_ver is required"
|
"Error: '$app' version == $inst_ver is too old" \
|
||||||
|
" '$app' version >= $req_ver is required"
|
||||||
ret=1
|
ret=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -761,7 +780,7 @@ version_controlled_file() {
|
|||||||
grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null |
|
grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null |
|
||||||
grep '^/[^/]*/[0-9]' > /dev/null
|
grep '^/[^/]*/[0-9]' > /dev/null
|
||||||
else
|
else
|
||||||
warn "no version control for $file?"
|
warn_ "no version control for $file?"
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user