From bbf75f811cdc701cb6920edb1dde68b9534d36cf Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Fri, 29 May 2015 23:55:01 +0200 Subject: [PATCH] install-deps.sh: keep debian alternatives Instead of removing the | when an alternative is found in the control file such as cryptsetup-bin | cryptsetup remove the surrounding spaces so that it is treated as a regular expression that matches either one. Replace the form sudo bash -c "FOO=bar ..." with sudo env FOO=bar ... to reduce the levels of shell escaping. Reported-by: http://dyweni.com/ Signed-off-by: Loic Dachary --- install-deps.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install-deps.sh b/install-deps.sh index e074f6de465d4..a8954fd99bfda 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -42,7 +42,7 @@ Ubuntu|Debian|Devuan) packages=$(dpkg-checkbuilddeps --admindir=$DIR debian/control 2>&1 | \ perl -p -e 's/.*Unmet build dependencies: *//;' \ -e 's/build-essential:native/build-essential/;' \ - -e 's/\|//g;' \ + -e 's/\s*\|\s*/\|/g;' \ -e 's/\(.*?\)//g;' \ -e 's/ +/\n/g;' | sort) case $(lsb_release -sc) in @@ -52,7 +52,7 @@ Ubuntu|Debian|Devuan) ;; esac packages=$(echo $packages) # change newlines into spaces - $SUDO bash -c "DEBIAN_FRONTEND=noninteractive apt-get install $backports -y $packages" || exit 1 + $SUDO env DEBIAN_FRONTEND=noninteractive apt-get install $backports -y $packages || exit 1 ;; CentOS|Fedora|RedHatEnterpriseServer) case $(lsb_release -si) in -- 2.39.5