summaryrefslogtreecommitdiff
path: root/src/control.sh
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2020-05-29 11:06:11 -0400
committerAndrew Cady <d@jerkface.net>2020-05-29 11:06:11 -0400
commit312976c1da23aa75e2c74ca1529d5109d01dbed4 (patch)
tree7ddbbe2c88add7ebed5b6cda77671405f9627f4c /src/control.sh
parentbcea2884ec1b7267ca4353628854ef9e1d3308e1 (diff)
more automagic
Diffstat (limited to 'src/control.sh')
-rwxr-xr-xsrc/control.sh23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/control.sh b/src/control.sh
index 7106187..370e64a 100755
--- a/src/control.sh
+++ b/src/control.sh
@@ -1,10 +1,25 @@
1#!/bin/sh 1#!/bin/sh
2VERSION=${VERSION:-$(TZ=UTC date -Is | tr -d :- | tr T . | sed 's/+.*//')} 2: ${VERSION:=$(TZ=UTC date -Is | tr -d :- | tr T . | sed 's/+.*//')}
3: ${PKG:=$(basename $(pwd))}
4: ${ARCH:=$(dpkg-architecture -q DEB_BUILD_ARCH)}
3cat - "$@" <<END 5cat - "$@" <<END
4Package: $(basename $(pwd)) 6Package: ${PKG}
5Source: $(basename $(pwd)) 7Source: ${PKG}
6Version: ${VERSION} 8Version: ${VERSION}
7Architecture: $(dpkg-architecture -q DEB_BUILD_ARCH) 9Architecture: ${ARCH}
8Origin: local 10Origin: local
9Maintainer: root <root@localhost> 11Maintainer: root <root@localhost>
10END 12END
13
14set --
15
16[ "$exec_prefix" ] || exit 0
17for f in bin/*
18do
19 [ -f "$f" ] || continue
20 set -- "$@" "$f ${exec_prefix}"
21done
22[ $# -gt 0 ] || exit 0
23
24printf 'Files:'
25printf ' %s\n' "$@"