File: gen-rtpengine-kmod-flags

package info (click to toggle)
rtpengine 13.5.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,676 kB
  • sloc: ansic: 86,764; perl: 59,422; python: 3,193; sh: 1,030; makefile: 693; asm: 211
file content (33 lines) | stat: -rwxr-xr-x 991 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
28
29
30
31
32
33
#!/bin/bash

if [ -z "${M}" ]; then
  M=$(pwd)
fi

if [ -z "${RTPENGINE_VERSION}" ]; then
  have_dpkg_parsechangelog=no
  if command -v dpkg-parsechangelog >/dev/null; then
    have_dpkg_parsechangelog=yes
  fi
  if [ -f "${M}/../debian/changelog" ]; then
    deb_changelog="${M}/../debian/changelog"
  else
    deb_changelog="${M}/debian/changelog"
  fi
  if [ "${have_dpkg_parsechangelog}" = yes ]; then
    deb_version="$(dpkg-parsechangelog -l"${deb_changelog}" | awk '/^Version: / {print $2}')"
  fi
  git_br_commit="git-$(cd "${M}" && git rev-parse --abbrev-ref --symbolic-full-name HEAD 2> /dev/null)-$(cd "${M}" && git rev-parse --short HEAD 2> /dev/null)"

  if [ "${have_dpkg_parsechangelog}" = yes ]; then
    RTPENGINE_VERSION+=" ${deb_version}"
  fi
  if [ "${git_br_commit}" != "git--" ]; then
    RTPENGINE_VERSION+=" ${git_br_commit}"
  fi

  if [ -z "${RTPENGINE_VERSION}" ]; then
    RTPENGINE_VERSION="undefined"
  fi
  echo "RTPENGINE_VERSION := ${RTPENGINE_VERSION}"
fi