File: pkgos_insert_include

package info (click to toggle)
openstack-pkg-tools 54
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 392 kB
  • ctags: 59
  • sloc: sh: 3,143; makefile: 28
file content (14 lines) | stat: -rwxr-xr-x 385 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

set -e

# Example call: pkgos_insert_include pkgos_func keystone.config
INC=/usr/share/openstack-pkg-tools/${1}
DST=debian/${2}
SRC="debian/${2}.in"

awk '{if ($1 == "#PKGOS-INCLUDE#") {
print "### Start of included " G " library"
while ((getline line < F) > 0) print line
print "### End of included " G " library"
} else print}' F=${INC} G=$(basename $INC) ${SRC} > ${DST}