dba551a518
Fix below linters errors E010 The "do" should be on same line as for E010 The "do" should be on same line as while E011 Then keyword is not on same line as if or elif keyword E020 Function declaration not in format ^function name {$ Ignore: E041 Arithmetic expansion using $[ is deprecated for $(( E042 local declaration hides errors E043 Arithmetic compound has inconsistent return semantics E044 Use [[ for non-POSIX comparisions Story: 2003366 Task: 24423 Change-Id: I8b6b72e702d3e89d1813772d6bf16819e28e818c Signed-off-by: Martin Chen <haochuan.z.chen@intel.com>
33 lines
929 B
Bash
Executable File
33 lines
929 B
Bash
Executable File
#!/bin/bash
|
|
|
|
#Copyright (c) 2016 Wind River Systems, Inc.
|
|
#
|
|
#SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
# This script removes uncompressed file. It can save a huge amount of disk space
|
|
# on the analysis server. Run this script after the very last time the data is parsed
|
|
# and BEFORE running parse-daily.sh script.
|
|
# If it is run after each intermediary parse, the download-data.sh script will download the
|
|
# uncompressed files again.
|
|
|
|
if [ ! -f lab.conf ]; then
|
|
echo "Lab configuration file is missing."
|
|
echo "See http://wiki.wrs.com/PBUeng/TitaniumServerSysengToolsAndDataAnalysis for more info."
|
|
exit 1
|
|
fi
|
|
|
|
source ./lab.conf
|
|
YEAR=`date +'%Y'`
|
|
|
|
files="${FILE_LIST// /, }"
|
|
read -p "Are you sure you want to remove all uncompressed $files files? [Y/N]: " -n 1 -r
|
|
echo
|
|
if [[ $REPLY =~ ^[Y]$ ]]; then
|
|
for FILE in ${FILE_LIST}; do
|
|
rm -v */*_${YEAR}-*${FILE}
|
|
done
|
|
else
|
|
echo "Remove request cancelled."
|
|
fi
|
|
|