diff options
author | intrigeri <intrigeri@boum.org> | 2010-04-24 19:56:54 +0200 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2010-04-24 20:00:13 +0200 |
commit | 582b7521cba4391845c167037cc1d362c7e76bd3 (patch) | |
tree | f997cbb0e9694c321b03045ad6a7f3689a991c0b | |
parent | 1cd91839c360931fc97bdef0b31d7887218d00ed (diff) | |
download | backupninja-582b7521cba4391845c167037cc1d362c7e76bd3.tar.gz backupninja-582b7521cba4391845c167037cc1d362c7e76bd3.tar.bz2 |
dup: ignore anything but digits and "." when comparing versions (Closes: #578987)
I'd love to use "dpkg --compare-versions" but we don't want backupninja to be
Debian-specific. Any similar tool?
Signed-off-by: intrigeri <intrigeri@boum.org>
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | handlers/dup.in | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -6,6 +6,8 @@ version 0.9.8 -- UNRELEASED . Use duplicity's --extra-clean option to get rid of unnecessary old cache files when cleaning up. This is enabled when using duplicity 0.6.01 or newer, that depends on local caching (Closes: #572721) + . dup: ignore anything but digits and "." when comparing versions + (Closes: #578987) version 0.9.7 -- January 27, 2010 backupninja changes diff --git a/handlers/dup.in b/handlers/dup.in index c8dfcba..c893017 100644 --- a/handlers/dup.in +++ b/handlers/dup.in @@ -95,8 +95,8 @@ else execstr_serverpart="scp://$destuser@$desthost/$destdir" fi -### duplicity version -duplicity_version="`duplicity --version | @AWK@ '{print $2}'`" +### duplicity version (ignore anything else than 0-9 and ".") +duplicity_version="`duplicity --version | @AWK@ '{print $2}' | @SED@ 's/[^.[:digit:]]//g'`" duplicity_major="`echo $duplicity_version | @AWK@ -F '.' '{print $1}'`" duplicity_minor="`echo $duplicity_version | @AWK@ -F '.' '{print $2}'`" duplicity_sub="`echo $duplicity_version | @AWK@ -F '.' '{print $3}'`" |