Options:
--gnulib-srcdir=DIRNAME Specify the local directory where gnulib
- sources reside. Use this if you already
- have gnulib sources on your machine, and
- do not want to waste your bandwidth downloading
- them again.
+ sources reside. Use this if you already
+ have gnulib sources on your machine, and
+ do not want to waste your bandwidth downloading
+ them again.
--copy Copy files instead of creating symbolic links.
--force Attempt to bootstrap even if the sources seem
- not to have been checked out.
+ not to have been checked out.
--skip-po Do not download po files.
--cvs-user=USERNAME Set the username to use when checking out
- sources from the gnulib repository.
+ sources from the gnulib repository.
If the file bootstrap.conf exists in the current working directory, its
contents are read as shell variables to configure the bootstrap.
# 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.
test -r bootstrap.conf && . ./bootstrap.conf
for po in `cd $ref_po_dir && echo *.po|sed 's/\.po//g'`; do
new_po="$ref_po_dir/$po.po"
cksum_file="$ref_po_dir/$po.s1"
- if ! sha1sum -c --status "$cksum_file" < "$new_po" > /dev/null; then
+ if ! "$SHA1SUM" -c --status "$cksum_file" < "$new_po" > /dev/null; then
echo "updated $po_dir/$po.po..."
- cp "$new_po" "$po_dir/$po.po" && sha1sum < "$new_po" > "$cksum_file"
+ cp "$new_po" "$po_dir/$po.po" && "$SHA1SUM" < "$new_po" > "$cksum_file"
fi
done
}
test "$dir/$file" = "$excluded_file" && continue 2
done
if test $file = Makefile.am; then
- copied=$copied${sep}$gnulib_mk; sep=$nl
+ copied=$copied${sep}$gnulib_mk; sep=$nl
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
- sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/$gnulib_mk || {
+ sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/$gnulib_mk || {
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
rm -f $dir/$gnulib_mk &&
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk