File: caddy-version

package info (click to toggle)
caddy 2.6.2-14
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,876 kB
  • sloc: sh: 730; makefile: 30
file content (18 lines) | stat: -rw-r--r-- 574 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# Check if version string was included at compile time.
version_cli=$(/usr/bin/caddy version)
version_deb=$(head -n 1 debian/changelog | awk '{print $2}' | tr -d \(\) | cut -d- -f1)
if [ -z $version_cli ]
then
    echo "Program version is zero."
    return 1
else
    if [ "$version_cli" = "$version_deb" ]
    then
        echo "Success: Program version matches changelog entry"
        return 0
    else
        echo "Program version differs from changelog entry!\n/usr/bin/caddy version: $version_cli\ndebian/changelog: $version_deb"
        return 1
    fi
fi