[jhalfs] branch trunk updated: create-sbu_du-report.sh: check that J_VALUE is never empty

"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.automated
Message-ID <164513849210.13661.9433820844879998745@rivendell.linuxfromscratch.org>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch trunk
in repository jhalfs.

The following commit(s) were added to refs/heads/trunk by this push:
     new 0f3b1c3  create-sbu_du-report.sh: check that J_VALUE is never empty
0f3b1c3 is described below

commit 0f3b1c317c1a57bd260a8ebf830bbca5c3b5449a
Author: Pierre Labastie <[email protected]>
AuthorDate: Thu Feb 17 23:53:51 2022 +0100

    create-sbu_du-report.sh: check that J_VALUE is never empty
---
 common/create-sbu_du-report.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/create-sbu_du-report.sh b/common/create-sbu_du-report.sh
index 460e4aa..fc8ddd7 100755
--- a/common/create-sbu_du-report.sh
+++ b/common/create-sbu_du-report.sh
@@ -64,6 +64,9 @@ if [ $(sed -n '/REALSBU/s/.*\([yn]\).*/\1/p' "$REPORT") = y ]; then
 else
     J_VALUE=$(sed -n '/N_PARALLEL/s/.*<\([^>]*\).*/\1/p' "$REPORT")
 fi
+# if jhalfs.config does not exist, or OPTIMIZE is 0, then J_VALUE is
+# still empty. Assume 1 in that case
+if [ -z "$J_VALUE" ]; then J_VALUE=1; fi
 echo -e "\nThe SBU unit value is equal to $SBU_UNIT seconds at -j$J_VALUE.\n"
 echo -e "\n\n$LINE\n\nThe SBU unit value is equal to $SBU_UNIT seconds at -j$J_VALUE.\n" >> "$REPORT"
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.