|
| 1 | +#!/bin/bash -eu |
| 2 | + |
| 3 | +if [ -f debian/debian.env ]; then |
| 4 | + # shellcheck disable=SC1091 |
| 5 | + . debian/debian.env |
| 6 | +fi |
| 7 | + |
| 8 | +if [ ! -d "${DEBIAN}" ]; then |
| 9 | + echo You must run this script from the top directory of this repository. |
| 10 | + exit 1 |
| 11 | +fi |
| 12 | + |
| 13 | +CONF="${DEBIAN}"/etc/update.conf |
| 14 | +if [ -f "${CONF}" ]; then |
| 15 | + # shellcheck disable=SC1090 |
| 16 | + . "${CONF}" |
| 17 | +fi |
| 18 | + |
| 19 | +FOREIGN_ARCHES="" |
| 20 | +LOCAL_CONF="${DEBIAN}/etc/local.conf" |
| 21 | +if [ -f "${LOCAL_CONF}" ]; then |
| 22 | + # shellcheck disable=SC1090 |
| 23 | + . "${LOCAL_CONF}" |
| 24 | +fi |
| 25 | + |
| 26 | +SKIP_RULES_D=${SKIP_RULES_D:-} |
| 27 | + |
| 28 | +# |
| 29 | +# Update package and DTB settings from master. |
| 30 | +# |
| 31 | +if [ -z "${SKIP_RULES_D}" ] ; then |
| 32 | + rsync -avc "${DEBIAN_MASTER}/rules.d/"*.mk "${DEBIAN}/rules.d/" |
| 33 | +fi |
| 34 | + |
| 35 | +# Remove the .mk files from the arch's that are not supported |
| 36 | +for i in ${FOREIGN_ARCHES} |
| 37 | +do |
| 38 | + rm -f "${DEBIAN}/rules.d/${i}.mk" |
| 39 | + git rm -f --ignore-unmatch "${DEBIAN}/rules.d/${i}.mk" || true |
| 40 | +done |
| 41 | + |
| 42 | +# |
| 43 | +# Update modprobe.d from master |
| 44 | +# |
| 45 | +# Some releases (trusty) don't have this directory, and rsync would fail |
| 46 | +# without this check. |
| 47 | +if [ -d "${DEBIAN}/modprobe.d/" ]; then |
| 48 | + rsync -avc --delete "${DEBIAN_MASTER}/modprobe.d/" "${DEBIAN}/modprobe.d" |
| 49 | +fi |
| 50 | + |
| 51 | +cp -p "${DEBIAN_MASTER}/control.d/"*.inclusion-list "${DEBIAN}/control.d" |
| 52 | + |
| 53 | +cp -p "${DEBIAN_MASTER}/reconstruct" "${DEBIAN}/reconstruct" |
| 54 | + |
| 55 | +if [ -x "${DEBIAN}/scripts/helpers/local-mangle" ]; then |
| 56 | + "./${DEBIAN}/scripts/helpers/local-mangle" |
| 57 | +fi |
0 commit comments