Remove VERSION file and hardcode it directly in the script
This commit is contained in:
parent
98bcf9f673
commit
cd82c07579
3 changed files with 6 additions and 14 deletions
|
|
@ -2,6 +2,10 @@ vX.X.X (unreleased)
|
|||
===================
|
||||
* Placeholder for next release
|
||||
|
||||
v1.4.2 (2017-10-30)
|
||||
===================
|
||||
* Remove VERSION file and hardcode it directly in the script.
|
||||
|
||||
v1.4.1 (2017-10-04)
|
||||
===================
|
||||
* Show program versions in output.
|
||||
|
|
|
|||
1
VERSION
1
VERSION
|
|
@ -1 +0,0 @@
|
|||
v1.4.1
|
||||
|
|
@ -45,6 +45,8 @@ CONFIG="duplicity-backup.conf"
|
|||
# Script Happens Below This Line - Shouldn't Require Editing #
|
||||
##############################################################
|
||||
|
||||
DBSH_VERSION="v1.4.2"
|
||||
|
||||
# make a backup of stdout and stderr for later
|
||||
exec 6>&1
|
||||
exec 7>&2
|
||||
|
|
@ -130,19 +132,6 @@ version_compare() {
|
|||
version_compare "${DUPLICITY_VERSION}" 0.7
|
||||
case $? in 2) LT07=1;; *) LT07=0;; esac
|
||||
|
||||
# Read the version string from the file named VERSION in the same directory as the script.
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
DBSH_VERPATH="$(dirname "$(readlink "$0")")/VERSION"
|
||||
else
|
||||
DBSH_VERPATH="$(dirname "$(readlink -f "$0")")/VERSION"
|
||||
fi
|
||||
|
||||
if [ -r "${DBSH_VERPATH}" ]; then
|
||||
DBSH_VERSION=$(<"${DBSH_VERPATH}")
|
||||
else
|
||||
DBSH_VERSION=unknown
|
||||
fi
|
||||
|
||||
version(){
|
||||
echo "duplicity-backup.sh ${DBSH_VERSION}"
|
||||
echo "duplicity ${DUPLICITY_VERSION}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue