Commit 63388313 authored by Frédéric Leroy's avatar Frédéric Leroy

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.
parent 1426ee5e
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment