Debian Codegraph @

scripts/jdg-debc

raw
1 #!/bin/sh
2
3 cat <<EOF
4 ┌──────────────────────────────────────────────────────────────────────────────┐
5 │ Displaying content of generated Debian packages. │
6 └──────────────────────────────────────────────────────────────────────────────┘
7 EOF
8
9 if ! which debc >/dev/null 2>&1 ; then
10 echo "Error: debc executable not available, please install the devscripts Debian package." >&2
11 exit 1
12 fi
13
14 CHANGES=$(find . -maxdepth 1 -name \*.changes ! -name \*_source.changes)
15
16 HOST_ARCH="$(dpkg-architecture -qDEB_HOST_ARCH)"
17 if [ -n "${HOST_ARCH}" ] && [ -n "${architecture}" ] && [ "${architecture}" != "${HOST_ARCH}" ] ; then
18 arch="-a ${architecture}"
19 fi
20
21 if [ -n "$CHANGES" ] >/dev/null 2>&1 ; then
22 for file in $CHANGES ; do
23 debc ${arch} "$file"
24 done
25 elif ls ./*.deb >/dev/null 2>&1 ; then
26 debc ${arch} ./*.deb
27 else
28 echo "No changes and deb files found in $(pwd), ignoring."
29 fi