Merge "Remove locals that were not inside functions"

This commit is contained in:
Jenkins 2015-01-20 21:21:34 +00:00 committed by Gerrit Code Review
commit 9e84d095f2

View File

@ -381,10 +381,10 @@ fi
if [[ -n "$LOGFILE" ]]; then if [[ -n "$LOGFILE" ]]; then
# Clean up old log files. Append '.*' to the user-specified # Clean up old log files. Append '.*' to the user-specified
# ``LOGFILE`` to match the date in the search template. # ``LOGFILE`` to match the date in the search template.
local logfile_dir="${LOGFILE%/*}" # dirname LOGFILE_DIR="${LOGFILE%/*}" # dirname
local logfile_name="${LOGFILE##*/}" # basename LOGFILE_NAME="${LOGFILE##*/}" # basename
mkdir -p $logfile_dir mkdir -p $LOGFILE_DIR
find $logfile_dir -maxdepth 1 -name $logfile_name.\* -mtime +$LOGDAYS -exec rm {} \; find $LOGFILE_DIR -maxdepth 1 -name $LOGFILE_NAME.\* -mtime +$LOGDAYS -exec rm {} \;
LOGFILE=$LOGFILE.${CURRENT_LOG_TIME} LOGFILE=$LOGFILE.${CURRENT_LOG_TIME}
SUMFILE=$LOGFILE.summary.${CURRENT_LOG_TIME} SUMFILE=$LOGFILE.summary.${CURRENT_LOG_TIME}
@ -407,8 +407,8 @@ if [[ -n "$LOGFILE" ]]; then
echo_summary "stack.sh log $LOGFILE" echo_summary "stack.sh log $LOGFILE"
# Specified logfile name always links to the most recent log # Specified logfile name always links to the most recent log
ln -sf $LOGFILE $logfile_dir/$logfile_name ln -sf $LOGFILE $LOGFILE_DIR/$LOGFILE_NAME
ln -sf $SUMFILE $logfile_dir/$logfile_name.summary ln -sf $SUMFILE $LOGFILE_DIR/$LOGFILE_NAME.summary
else else
# Set up output redirection without log files # Set up output redirection without log files
# Set fd 3 to a copy of stdout. So we can set fd 1 without losing # Set fd 3 to a copy of stdout. So we can set fd 1 without losing