+2024-03-15 Bruno Haible <bruno@clisp.org>
+
+ gnulib-tool: Enhance last patch.
+ * gnulib-tool: If gnulib-tool.sh failed but gnulib-tool.py succeeded,
+ report that and don't erase the outputs and log files.
+
2024-03-14 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Follow gnulib-tool changes, part 57.
"$gnulib_dir/gnulib-tool.sh" "$@" >"$tmp-sh-out" 2>"$tmp-sh-err"
shrc=$?
if test $shrc != 0; then
- cat "$tmp-sh-out"
- cat "$tmp-sh-err" >&2
- rm -rf "$tmp" "$tmp-sh-out" "$tmp-sh-err" "$tmp-py-out" "$tmp-py-err"
- exit $shrc
+ if test $pyrc = 0; then
+ func_fatal_error "gnulib-tool.sh failed but gnulib-tool.py succeeded! Inspect $tmp-sh-err and $tmp-py-err."
+ else
+ cat "$tmp-sh-out"
+ cat "$tmp-sh-err" >&2
+ rm -rf "$tmp" "$tmp-sh-out" "$tmp-sh-err" "$tmp-py-out" "$tmp-py-err"
+ exit $shrc
+ fi
fi
if test $pyrc != 0; then
func_fatal_error "gnulib-tool.sh succeeded but gnulib-tool.py failed! Inspect $tmp/ and $tmp-py-err."
"$gnulib_dir/gnulib-tool.sh" "$@" >"$tmp-sh-out" 2>"$tmp-sh-err"
shrc=$?
if test $shrc != 0; then
- cat "$tmp-sh-out"
- cat "$tmp-sh-err" >&2
- rm -rf "$tmp" "$tmp-sh-out" "$tmp-sh-err" "$tmp-py-out" "$tmp-py-err"
- exit $shrc
+ if test $pyrc = 0; then
+ func_fatal_error "gnulib-tool.sh failed but gnulib-tool.py succeeded! Inspect $tmp-sh-err and $tmp-py-err."
+ else
+ cat "$tmp-sh-out"
+ cat "$tmp-sh-err" >&2
+ rm -rf "$tmp" "$tmp-sh-out" "$tmp-sh-err" "$tmp-py-out" "$tmp-py-err"
+ exit $shrc
+ fi
fi
if test $pyrc != 0; then
func_fatal_error "gnulib-tool.sh succeeded but gnulib-tool.py failed! Inspect $tmp/ and $tmp-py-err."
"$gnulib_dir/gnulib-tool.sh" "$@" >"$tmp-sh-out" 2>"$tmp-sh-err"
shrc=$?
if test $shrc != 0; then
- cat "$tmp-sh-out"
- cat "$tmp-sh-err" >&2
- rm -rf "$tmp-sh-out" "$tmp-sh-err" "$tmp-py-out" "$tmp-py-err"
- exit $shrc
+ if test $pyrc = 0; then
+ func_fatal_error "gnulib-tool.sh failed but gnulib-tool.py succeeded! Inspect $tmp-sh-err and $tmp-py-err."
+ else
+ cat "$tmp-sh-out"
+ cat "$tmp-sh-err" >&2
+ rm -rf "$tmp-sh-out" "$tmp-sh-err" "$tmp-py-out" "$tmp-py-err"
+ exit $shrc
+ fi
fi
if test $pyrc != 0; then
func_fatal_error "gnulib-tool.sh succeeded but gnulib-tool.py failed! Inspect $tmp-py-err."