Changeset 03b24b2
- Timestamp:
- 02/19/2022 02:08:37 PM (2 years ago)
- Branches:
- ablfs-more, legacy, trunk
- Children:
- 3faf067
- Parents:
- 0f3b1c3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/create-sbu_du-report.sh
r0f3b1c3 r03b24b2 10 10 11 11 # Make sure that we have a directory as first argument 12 [ [ ! -d "$LOGSDIR" ]] && \12 [ ! -d "$LOGSDIR" ] && \ 13 13 echo -e "\nUSAGE: create-sbu_du-report.sh logs_directory [book_version] [date]\n" && exit 14 14 15 15 # Make sure that the first argument is a jhalfs logs directory 16 [ [ ! -f "$LOGSDIR"/000-masterscript.log ]] && \16 [ ! -f "$LOGSDIR"/000-masterscript.log ] && \ 17 17 echo -e "\nLooks like $LOGSDIR isn't a jhalfs logs directory.\n" && exit 18 18 19 # Make sure something has been built otherwise no need for report :) 20 [ ! -f "$LOGSDIR"/???-binutils-pass1* ] && \ 21 echo -e "\nLooks like nothing has been built yet. Aborting report.\n" && exit 22 19 23 # If this script is run manually, the book version may be unknown 20 [ [ -z "$VERSION" ]] && VERSION=unknown21 [ [ -z "$DATE" ]] && DATE=$(date --iso-8601)24 [ -z "$VERSION" ] && VERSION=unknown 25 [ -z "$DATE" ] && DATE=$(date --iso-8601) 22 26 23 27 # If there is iteration logs directories, copy the logs inside iteration-1 24 28 # to the top level dir 25 [ [ -d "$LOGSDIR"/build_1 ]] && \29 [ -d "$LOGSDIR"/build_1 ] && \ 26 30 cp $LOGSDIR/build_1/* $LOGSDIR 27 31 … … 29 33 REPORT="$VERSION"-SBU_DU-"$DATE".report 30 34 31 [ -f $REPORT] && : >$REPORT35 [ -f "$REPORT" ] && : >$REPORT 32 36 33 37 # Dump generation time stamp and book version … … 60 64 popd 61 65 # Get the -j value of the SBU 62 if [ $(sed -n '/REALSBU/s/.*\([yn]\).*/\1/p' "$REPORT")= y ]; then66 if [ "$(sed -n '/REALSBU/s/.*\([yn]\).*/\1/p' "$REPORT")" = y ]; then 63 67 J_VALUE="1" 64 68 else … … 67 71 # if jhalfs.config does not exist, or OPTIMIZE is 0, then J_VALUE is 68 72 # still empty. Assume 1 in that case 69 if [ -z "$J_VALUE" ]; then J_VALUE=1; fi 70 echo -e "\nThe SBU unit value is equal to $SBU_UNIT seconds at -j$J_VALUE.\n" 73 echo -e "\nThe SBU unit value is equal to $SBU_UNIT seconds at -j${J_VALUE:=1}.\n" 71 74 echo -e "\n\n$LINE\n\nThe SBU unit value is equal to $SBU_UNIT seconds at -j$J_VALUE.\n" >> "$REPORT" 72 75
Note:
See TracChangeset
for help on using the changeset viewer.