Skip to content

Commit

Permalink
fix build wrapper script
Browse files Browse the repository at this point in the history
  • Loading branch information
nkraetzschmar committed Dec 8, 2023
1 parent 43e5226 commit 75976af
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions container/bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -exuo pipefail
exec 3>&1
exec 1>&2

pkg="$(build_source "$@")"

build_indep "$pkg.dsc"
build_archdep "$pkg.dsc"
[ -d /output ] || sudo mkdir /output
build_source "$@"
build_indep /output
build_archdep /output
5 changes: 3 additions & 2 deletions container/bin/build_archdep
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ exec 3>&1
exec 1>&2

main() (
DEB_BUILD_OPTIONS="$(cat /input/.build_options)"
input_dir="${1:-/input}"
DEB_BUILD_OPTIONS="$(cat "$input_dir/.build_options")"
export DEB_BUILD_OPTIONS

dsc="$(realpath "/input/.source")"
dsc="$(realpath "$input_dir/.source")"
dpkg_arch="$(dpkg --print-architecture)"
dsc_arch="$(grep -oP '(?<=^Architecture: ).*' < "$dsc" | tr ' ' '\n')"

Expand Down
5 changes: 3 additions & 2 deletions container/bin/build_indep
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ exec 3>&1
exec 1>&2

main() (
DEB_BUILD_OPTIONS="$(cat /input/.build_options)"
input_dir="${1:-/input}"
DEB_BUILD_OPTIONS="$(cat "$input_dir/.build_options")"
export DEB_BUILD_OPTIONS

dsc="$(realpath "/input/.source")"
dsc="$(realpath "$input_dir/.source")"
dsc_arch="$(grep -oP '(?<=^Architecture: ).*' < "$dsc" | tr ' ' '\n')"

grep -P '^(linux-)?all$' <<< "$dsc_arch" || exit 0
Expand Down

0 comments on commit 75976af

Please sign in to comment.