cd82c07579f370e6778fddec250031a99c59faae

Author
zertrin <zertrin@gmail.com>
Committer
zertrin <zertrin@gmail.com>
Date

Message

Remove VERSION file and hardcode it directly in the script

Diff

 1diff --git a/CHANGELOG b/CHANGELOG
 2index e7646d8497edcdb1726b119ba258a2e9039c9a9f..e6df35c0243b73a69f0788eb2a30dbad070c7e52 100644
 3--- a/CHANGELOG
 4+++ b/CHANGELOG
 5@@ -2,6 +2,10 @@ vX.X.X (unreleased)
 6 ===================
 7   * Placeholder for next release
 8 
 9+v1.4.2 (2017-10-30)
10+===================
11+  * Remove VERSION file and hardcode it directly in the script.
12+
13 v1.4.1 (2017-10-04)
14 ===================
15   * Show program versions in output.
16diff --git a/VERSION b/VERSION
17deleted file mode 100644
18index 66d62a800132c0abf33d6f42904e6d0036323e95..0000000000000000000000000000000000000000
19--- a/VERSION
20+++ /dev/null
21@@ -1 +0,0 @@
22-v1.4.1
23diff --git a/duplicity-backup.sh b/duplicity-backup.sh
24index 739fab3001802af4dbd2a533c3997db1bdbf4add..a99ab06c4fa2d807983ff85eb52dba59bccee9c4 100755
25--- a/duplicity-backup.sh
26+++ b/duplicity-backup.sh
27@@ -45,6 +45,8 @@ CONFIG="duplicity-backup.conf"
28 # Script Happens Below This Line - Shouldn't Require Editing #
29 ##############################################################
30 
31+DBSH_VERSION="v1.4.2"
32+
33 # make a backup of stdout and stderr for later
34 exec 6>&1
35 exec 7>&2
36@@ -130,19 +132,6 @@ version_compare() {
37 version_compare "${DUPLICITY_VERSION}" 0.7
38 case $? in 2) LT07=1;; *) LT07=0;; esac
39 
40-# Read the version string from the file named VERSION in the same directory as the script.
41-if [[ "$(uname)" == "Darwin" ]]; then
42-  DBSH_VERPATH="$(dirname "$(readlink "$0")")/VERSION"
43-else
44-  DBSH_VERPATH="$(dirname "$(readlink -f "$0")")/VERSION"
45-fi
46-
47-if [ -r "${DBSH_VERPATH}" ]; then
48-  DBSH_VERSION=$(<"${DBSH_VERPATH}")
49-else
50-  DBSH_VERSION=unknown
51-fi
52-
53 version(){
54   echo "duplicity-backup.sh ${DBSH_VERSION}"
55   echo "duplicity ${DUPLICITY_VERSION}"