From 633883131526d0fedfd446bc01c0bf70cf8a408b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Mon, 9 Nov 2020 14:55:02 +0100 Subject: [PATCH] feat(build_helper): use 'id' command instead $USER variable When $USER is not set (Yes we did !), extracting protobuf fails. Wh avoid this by using the 'id' command both to get user and group ids. --- cmake_targets/tools/build_helper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 1ba3b225a6..b066bc23d8 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -256,7 +256,7 @@ install_protobuf_from_source(){ then rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0 wget --tries=3 --retry-connrefused https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz - tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $USER --group $(groups | cut -d" " -f1) --no-same-owner + tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $($id -u) --group $(id -g) --no-same-owner cd protobuf-3.3.0/ else export LD_LIBRARY_PATH=/usr/local/lib #protoc needs to know where toclook for shared libs