]> gitweb.fluxo.info Git - backupninja.git/commitdiff
dup: ignore anything but digits and "." when comparing versions (Closes: #578987)
authorintrigeri <intrigeri@boum.org>
Sat, 24 Apr 2010 17:56:54 +0000 (19:56 +0200)
committerintrigeri <intrigeri@boum.org>
Sat, 24 Apr 2010 18:00:13 +0000 (20:00 +0200)
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>
ChangeLog
handlers/dup.in

index 7b8d3831c58de2a0eaed4a3512c20a084d3cb061..f94420184259f01857823663fa193df6f9d4efd7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index c8dfcba6480340122769725e0d23942f1b4ded04..c8930176a95b77c79e82d08358356e33fe3dc80c 100644 (file)
@@ -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}'`"