File: version

package info (click to toggle)
gnome-text-editor 49.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,972 kB
  • sloc: ansic: 23,926; xml: 704; sh: 67; makefile: 12
file content (12 lines) | stat: -rwxr-xr-x 344 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
verstring="$(LC_ALL=C gnome-text-editor --version)"
instvers="$(dpkg-query -f '${Version}' --show gnome-text-editor | cut -f1 -d- | tr '~' '.')"
expected="Text Editor $instvers"
case "$verstring" in *"$expected"*)
    exit 0
    ;;
  *)
    printf >&2  "Expected: %s\n     Got: %s\n" "$expected" "$verstring"
    exit 1
    ;;
esac