source: lliurex-version-timestamp/trunk/fuentes/src/updatepackage.sh @ 908

Last change on this file since 908 was 908, checked in by kbut, 4 years ago

fix bug with update version

  • Property svn:executable set to *
File size: 467 bytes
Line 
1#!/bin/bash
2DATE=$(date +%y%m%d)
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 TracBrowser for help on using the repository browser.