From 801e8041438636f264d8d11aa2b6f088fab3d073 Mon Sep 17 00:00:00 2001 From: Muhammet Kara Date: Wed, 28 Dec 2016 17:43:29 +0300 Subject: Remove useless cat, and replace backtick cat is a tool for con"cat"enating files. Reading a single file as input to a program is considered a Useless Use Of Cat (UUOC). It's more efficient and less roundabout to simply give file as input. Also use $(..) instead of legacy `..` Backtick command substitution `..` is legacy syntax with several issues. It has a series of undefined behaviors related to quoting in POSIX. It imposes a custom escaping mode with surprising results. It's exceptionally hard to nest. $(..) command substitution has none of these problems, and is therefore strongly encouraged. Change-Id: Ia668c6323660641bbb5084ee824ae9ae7631c76f Reviewed-on: https://gerrit.libreoffice.org/32473 Tested-by: Jenkins Reviewed-by: Michael Stahl --- solenv/bin/bin_library_info.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'solenv') diff --git a/solenv/bin/bin_library_info.sh b/solenv/bin/bin_library_info.sh index 88925bf1970b..94bc262c0bc3 100755 --- a/solenv/bin/bin_library_info.sh +++ b/solenv/bin/bin_library_info.sh @@ -34,7 +34,7 @@ die() get_config_sha() { pushd ${SRCDIR?} > /dev/null - cat ${BUILDDIR?}/config_host.mk | git hash-object --stdin + git hash-object ${BUILDDIR?}/config_host.mk popd > /dev/null } -- cgit