Print this page
9231 nightly should create a log/latest/ symlink

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/nightly.sh
          +++ new/usr/src/tools/scripts/nightly.sh
↓ open down ↓ 1015 lines elided ↑ open up ↑
1016 1016  
1017 1017  #
1018 1018  # Juggle the logs and optionally send mail on completion.
1019 1019  #
1020 1020  
1021 1021  function logshuffle {
1022 1022          LLOG="$ATLOG/log.`date '+%F.%H:%M'`"
1023 1023          if [ -f $LLOG -o -d $LLOG ]; then
1024 1024                  LLOG=$LLOG.$$
1025 1025          fi
1026      -        mkdir $LLOG
     1026 +
     1027 +        rm -f "$ATLOG/latest" 2>/dev/null
     1028 +        mkdir -p $LLOG
1027 1029          export LLOG
1028 1030  
1029 1031          if [ "$build_ok" = "y" ]; then
1030 1032                  mv $ATLOG/proto_list_${MACH} $LLOG
1031 1033  
1032 1034                  if [ -f $ATLOG/proto_list_tools_${MACH} ]; then
1033 1035                          mv $ATLOG/proto_list_tools_${MACH} $LLOG
1034 1036                  fi
1035 1037  
1036 1038                  if [ -f $TMPDIR/wsdiff.results ]; then
↓ open down ↓ 61 lines elided ↑ open up ↑
1098 1100          "Nightly ${MACH} Build of `basename ${CODEMGR_WS}` ${state}." \
1099 1101                          ${MAILTO}
1100 1102          fi
1101 1103  
1102 1104          if [ "$u_FLAG" = "y" -a "$build_ok" = "y" ]; then
1103 1105                  staffer cp ${LLOG}/mail_msg $PARENT_WS/usr/src/mail_msg-${MACH}
1104 1106                  staffer cp $LOGFILE $PARENT_WS/usr/src/nightly-${MACH}.log
1105 1107          fi
1106 1108  
1107 1109          mv $LOGFILE $LLOG
     1110 +
     1111 +        ln -s "$LLOG" "$ATLOG/latest"
1108 1112  }
1109 1113  
1110 1114  #
1111 1115  #       Remove the locks and temporary files on any exit
1112 1116  #
1113 1117  function cleanup {
1114 1118          logshuffle
1115 1119  
1116 1120          [ -z "$lockfile" ] || staffer rm -f $lockfile
1117 1121          [ -z "$atloglockfile" ] || rm -f $atloglockfile
↓ open down ↓ 1042 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX