Ignore:
Timestamp:
Mar 21, 2016, 8:49:59 AM (4 years ago)
Author:
kbut
Message:

fix bug with update version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lliurex-version-timestamp/trunk/fuentes/src/updatepackage.sh

    r907 r908  
    11#!/bin/bash
    22DATE=$(date +%y%m%d)
    3 DEBFULLNAME="LliureX Team" DEBEMAIL="lliurex@gva.es" dch -v 16.${DATE} --distribution xenial "Mirror updated at ${DATE}"
     3VERSION="16.${DATE}"
     4LASTVERSION=$(dpkg-parsechangelog --show-field Version)
     5rc=0
     6dpkg --compare-versions $VERSION gt $LASTVERSION && rc=1
     7if [ "$rc" = "0" ]; then
     8        SUBVERSION=${LASTVERSION##*.}
     9        if [ "SUBVERSION" = "VERSION" ];
     10                VERSION="${VERSION}.1"
     11        else
     12                VERSION="${VERSION}.$(( SUBVERSION + 1 ))"
     13        fi
     14fi
     15DEBFULLNAME="LliureX Team" DEBEMAIL="lliurex@gva.es" dch -v ${VERSION} --distribution xenial "Mirror updated at ${DATE}"
Note: See TracChangeset for help on using the changeset viewer.