From 38d374cd77621a1bb5bb510fb1752ebfbe92341b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 10 Nov 2017 19:50:59 +0100 Subject: bin/build-packages: use sudo for calling build command --- bin/build-packages | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bin/build-packages') diff --git a/bin/build-packages b/bin/build-packages index 2c326fa..6c9478d 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -306,7 +306,8 @@ while [ "${count}" -ne 0 ]; do "${straw}" # by piping the log, we don't see anything in the terminal, # but all ways to duplicate the logs seem pretty elaborate - if "${build_command}" ${parameters} > \ + # shellcheck disable=SC2024 + if sudo "${build_command}" ${parameters} > \ "$( date -u --iso-8601=seconds | \ cut -d+ -f1 @@ -353,8 +354,8 @@ while [ "${count}" -ne 0 ]; do fi # this is a little hack: makepkg receives '--version', but namcap is run nevertheless # (and it only works with devtools32, because they are running namcap on *.pkg.tar.xz in the base directory, too) - "${x86_64_build_command}" -- -- --version > /dev/null 2>&1 || \ - "${x86_64_build_command}" -c -- -- --version > /dev/null 2>&1 || \ + sudo "${x86_64_build_command}" -- -- --version > /dev/null 2>&1 || \ + sudo "${x86_64_build_command}" -c -- -- --version > /dev/null 2>&1 || \ true # now we generate diffs from the namcap.logs find . "${tar_content_dir}/" -maxdepth 1 -type f -name '*.pkg.tar.xz-namcap.log' -printf '%p\n' | \ -- cgit v1.2.3-70-g09d2