File: test-version

package info (click to toggle)
deb-gview 0.3.8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 648 kB
  • sloc: ansic: 2,354; sh: 1,029; makefile: 80; xml: 44; sed: 16
file content (27 lines) | stat: -rwxr-xr-x 571 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

# Check for installed package
if [ ! -e /usr/bin/deb-gview ]; then
  echo "deb-gview binary not found in /usr/bin/"
  exit 1
fi

# Get current version from debian/changelog
version_changelog=`head debian/changelog -n 1 | cut -d "(" -f2 | cut -d ")" -f1`

echo "> deb-gview -v"
deb-gview -v
echo ""
echo "> deb-gview --version"
deb-gview --version
echo ""

# Compare version output to changelog version
version_output=`deb-gview -v | awk '{print $3}'`

if [ $version_changelog = $version_output ]; then
  exit 0
else
  echo "Version number mismatch"
  exit 1
fi