Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2016-07-24 18:54:59 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-07-24 18:54:59 +0300
commit6d6cd79a8290d071a015cfaa196e05e5780cf752 (patch)
tree0547497bf1f84c67c8b8711463593ce7d5057336 /include/helper_show
parent773c410a02a6b4ba4d148cf5e8e3e8d58a59fea7 (diff)
Improve detection and display of gzipped changelog
Diffstat (limited to 'include/helper_show')
-rw-r--r--include/helper_show16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/helper_show b/include/helper_show
index a6c622dc..1d838092 100644
--- a/include/helper_show
+++ b/include/helper_show
@@ -123,15 +123,19 @@ if [ $# -gt 0 ]; then
CHANGELOG=""
if [ -z "${SEARCH_VERSION}" ]; then SEARCH_VERSION="${PROGRAM_VERSION}"; fi
STARTED=0
- for FILE in ${CHANGELOG_PATHS}; do
- if [ -f ${FILE}/CHANGELOG.md ]; then CHANGELOG="${FILE}/CHANGELOG.md"; fi
- # We might come accross a gzipped changelog
- if [ -f ${FILE}/changelog.gz ]; then
+ for FILEPATH in ${CHANGELOG_PATHS}; do
+ if [ -f ${FILEPATH}/CHANGELOG.md ]; then
+ CHANGELOG="${FILEPATH}/CHANGELOG.md"
+ # Check also for gzipped changelog
+ elif [ -f ${FILEPATH}/changelog.gz ]; then
ZCAT=$(which zcat 2> /dev/null)
- if [ ! -z "${HAS_ZCAT}" ]; then
+ if [ ! -z "${ZCAT}" ]; then
CreateTempFile
CHANGELOG="${TEMP_FILE}"
- ${ZCAT} ${FILE}/changelog.gz > ${CHANGELOG}
+ LogText "Result: found gzipped changelog in ${FILEPATH}"
+ LogText "Action: Creating temporary file to store text"
+ ${ZCAT} ${FILEPATH}/changelog.gz > ${CHANGELOG}
+ else
DisplayError "Could not find zcat utility to use on gzipped changelog"
fi
fi