Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tarot
gnulib
Commits
ecda40af
Commit
ecda40af
authored
Aug 19, 2009
by
Akim Demaille
Committed by
Jim Meyering
Aug 20, 2009
Browse files
bootstrap: find sha1sum when named gsha1sum.
* bootstrap (find_tool): New. ($SHA1SUM): New. Use it.
parent
1bf2866e
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
ecda40af
2009-08-19 Akim Demaille <demaille@gostai.com>
bootstrap: find sha1sum when named gsha1sum.
* bootstrap (find_tool): New.
($SHA1SUM): New.
Use it.
2009-08-20 Jim Meyering <meyering@redhat.com>
maint.mk: _header_without_use: fix a quoting bug and remove a bash'ism
build-aux/bootstrap
View file @
ecda40af
...
...
@@ -148,6 +148,37 @@ copy=false
# on which version control system (if any) is used in the source directory.
vc_ignore
=
auto
# find_tool ENVVAR NAMES...
# -------------------------
find_tool
()
{
# Find sha1sum, named gsha1sum on MacPorts.
find_tool_envvar
=
$1
shift
if
eval test
x
"
\$
$find_tool_envvar
"
=
x
;
then
for
i
do
if
(
$i
--version
</dev/null
)
>
/dev/null 2>&1
;
then
find_tool_res
=
$i
break
fi
done
fi
if
test
x
"
$find_tool_res
"
=
x
;
then
echo
>
&2
"
$0
:
$find_tool_name
is required"
exit
1
fi
(
$find_tool_res
--version
</dev/null
)
>
/dev/null 2>&1
||
{
echo
>
&2
"
$0
: cannot run
$find_tool_res
--version"
exit
1
}
eval
"
$find_tool_envvar
=
\"
$find_tool_res
\"
"
eval
"export
$find_tool_envvar
"
}
# Find sha1sum, named gsha1sum on MacPorts.
find_tool SHA1SUM
sha1sum
gsha1sum
# Override the default configuration, if necessary.
# Make sure that bootstrap.conf is sourced from the current directory
# if we were invoked as "sh bootstrap".
...
...
@@ -420,11 +451,11 @@ update_po_files() {
cksum_file
=
"
$ref_po_dir
/
$po
.s1"
if
!
test
-f
"
$cksum_file
"
||
!
test
-f
"
$po_dir
/
$po
.po"
||
!
$
{
SHA1SUM
-sha1sum
}
-c
--status
"
$cksum_file
"
\
!
$SHA1SUM
-c
--status
"
$cksum_file
"
\
<
"
$new_po
"
>
/dev/null
;
then
echo
"updated
$po_dir
/
$po
.po..."
cp
"
$new_po
"
"
$po_dir
/
$po
.po"
\
&&
$
{
SHA1SUM
-sha1sum
}
<
"
$new_po
"
>
"
$cksum_file
"
&&
$SHA1SUM
<
"
$new_po
"
>
"
$cksum_file
"
fi
done
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment