Skip to content

Commit

Permalink
Remove VERSION file and hardcode it directly in the script
Browse files Browse the repository at this point in the history
  • Loading branch information
zertrin committed Oct 30, 2017
1 parent 98bcf9f commit cd82c07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

15 changes: 2 additions & 13 deletions duplicity-backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit cd82c07

Please sign in to comment.