Skip to content
Snippets Groups Projects
Commit 582b7521 authored by intrigeri's avatar intrigeri
Browse files

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: default avatarintrigeri <intrigeri@boum.org>
parent 1cd91839
Branches
Tags
No related merge requests found
...@@ -6,6 +6,8 @@ version 0.9.8 -- UNRELEASED ...@@ -6,6 +6,8 @@ version 0.9.8 -- UNRELEASED
. Use duplicity's --extra-clean option to get rid of unnecessary old . Use duplicity's --extra-clean option to get rid of unnecessary old
cache files when cleaning up. This is enabled when using duplicity cache files when cleaning up. This is enabled when using duplicity
0.6.01 or newer, that depends on local caching (Closes: #572721) 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 version 0.9.7 -- January 27, 2010
backupninja changes backupninja changes
......
...@@ -95,8 +95,8 @@ else ...@@ -95,8 +95,8 @@ else
execstr_serverpart="scp://$destuser@$desthost/$destdir" execstr_serverpart="scp://$destuser@$desthost/$destdir"
fi fi
### duplicity version ### duplicity version (ignore anything else than 0-9 and ".")
duplicity_version="`duplicity --version | @AWK@ '{print $2}'`" duplicity_version="`duplicity --version | @AWK@ '{print $2}' | @SED@ 's/[^.[:digit:]]//g'`"
duplicity_major="`echo $duplicity_version | @AWK@ -F '.' '{print $1}'`" duplicity_major="`echo $duplicity_version | @AWK@ -F '.' '{print $1}'`"
duplicity_minor="`echo $duplicity_version | @AWK@ -F '.' '{print $2}'`" duplicity_minor="`echo $duplicity_version | @AWK@ -F '.' '{print $2}'`"
duplicity_sub="`echo $duplicity_version | @AWK@ -F '.' '{print $3}'`" duplicity_sub="`echo $duplicity_version | @AWK@ -F '.' '{print $3}'`"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment