purple-plastic-57801
05/16/2023, 1:01 AMrun_shell_command
.. it is to build a c library with ninja and link it with ldconfig.
If I have
system_binary(
name="git",
binary_name="git",
fingerprint_args=["version"],
)
adhoc_tool(
name = "meson",
runnable=".build/requirements:reqs-libcamera#meson",
)
run_shell_command(
name="libcamera",
command="./libcamera.sh",
runnable_dependencies=[".build/requirements:reqs-libcamera#meson", ":git"]
)
shell_sources(name="shell-scripts")
Where libcamera.sh is
#!/usr/bin/env bash
rm -rf .lc_build_temp
mkdir -p .lc_build_temp
cd .lc_build_temp \
&& git clone <https://github.com/bloop/libcamera.git> \
&& cd libcamera \
&& git checkout v0.0.4 \
&& meson setup build \
&& ninja -C build
cd .lc_build_temp/libcamera && sudo ninja -C build install
sudo ldconfig || echo "Finished ldconfig"
rm -rf .lc_build_temp
It totally works up until it needs a sudo password 🤔 Anyway to have it ask me?enough-analyst-54434
05/16/2023, 1:08 AMman sudo
and read up on -A
- that's the core of your issue.enough-analyst-54434
05/16/2023, 1:08 AM-S
could allow some trick and avoid the non-existent terminal?enough-analyst-54434
05/16/2023, 1:09 AMenough-analyst-54434
05/16/2023, 1:10 AMpurple-plastic-57801
05/16/2023, 1:34 AMpurple-plastic-57801
05/16/2023, 1:41 AM