File: check-version

package info (click to toggle)
octave-pkg-dev 1.4.4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 104 kB
  • ctags: 36
  • sloc: perl: 176; sh: 88; makefile: 7
file content (18 lines) | stat: -rwxr-xr-x 423 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

echo -n "Checking the Octave version... "

dep=$(grep Depends DESCRIPTION	\
      | perl -ne 'if (/octave\s+\(>=\s*([.\d]+)\)/i) {print $1}')

if [ "$dep" != "" ] ; then
    if dpkg --compare-versions "$version" lt "$dep" ; then
        echo ;
        echo "Octave version mismatch: "		\
             "Needs >= $dep, but version "		\
             "$version is installed" 1>&2 ;
        exit 1
    fi
fi

echo ok