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 /handlers | |
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>
Diffstat (limited to 'handlers')
-rw-r--r-- | handlers/dup.in | 4 |
1 files changed, 2 insertions, 2 deletions
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}'`" |