Show program versions in output

This commit is contained in:
zertrin 2017-09-27 22:18:02 +08:00
parent e4df413036
commit def00abe60

View file

@ -2,7 +2,7 @@
# #
# Copyright (c) 2008-2010 Damon Timm. # Copyright (c) 2008-2010 Damon Timm.
# Copyright (c) 2010 Mario Santagiuliana. # Copyright (c) 2010 Mario Santagiuliana.
# Copyright (c) 2012-2016 Marc Gallet. # Copyright (c) 2012-2017 Marc Gallet.
# #
# This program is free software: you can redistribute it and/or modify it under # This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software # the terms of the GNU General Public License as published by the Free Software
@ -129,12 +129,12 @@ version_compare() {
version_compare "${DUPLICITY_VERSION}" 0.7 version_compare "${DUPLICITY_VERSION}" 0.7
case $? in 2) LT07=1;; *) LT07=0;; esac case $? in 2) LT07=1;; *) LT07=0;; esac
version(){ # Read the version string from the file VERSION
# Read the version string from the file VERSION DBSH_VERSION=$(<VERSION)
VERSION=$(<VERSION)
echo "duplicity-backup.sh ${VERSION}" version(){
${DUPLICITY} --version echo "duplicity-backup.sh ${DBSH_VERSION}"
echo "duplicity ${DUPLICITY_VERSION}"
exit 0 exit 0
} }
@ -305,7 +305,7 @@ fi
# fd1 is stdout and is always logged but only shown if not QUIET # fd1 is stdout and is always logged but only shown if not QUIET
# fd2 is stderr and is always shown on screen and logged # fd2 is stderr and is always shown on screen and logged
# fd3 is like stdout but always shown on screen (for interactive prompts) # fd3 is like stdout but always shown on screen (for interactive prompts)
# fd4 is always shown on sceen but never logged (for the usage text) # fd4 is always shown on screen but never logged (for the usage text)
# fd5 is never shown on screen but always logged (for delimiters in the log) # fd5 is never shown on screen but always logged (for delimiters in the log)
# #
@ -900,6 +900,10 @@ check_variables
echo -e "-------- START DUPLICITY-BACKUP SCRIPT for ${HOSTNAME} --------\n" >&5 echo -e "-------- START DUPLICITY-BACKUP SCRIPT for ${HOSTNAME} --------\n" >&5
echo -e "-------[ Program versions ]-------\n"
echo -e "duplicity-backup.sh ${DBSH_VERSION}\n"
echo -e "duplicity ${DUPLICITY_VERSION}\n"
get_lock get_lock
INCLUDE= INCLUDE=