mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-05 17:45:40 +08:00
tools/setup: skip native package managers if we can (#38112)
* tools/setup: skip native package managers if we can * revert that
This commit is contained in:
@@ -30,8 +30,19 @@ function install_linux_deps() {
|
||||
SUDO="sudo"
|
||||
fi
|
||||
|
||||
local missing_linux_deps=0
|
||||
for cmd in gcc g++ make curl curl-config git; do
|
||||
if ! command -v "$cmd" > /dev/null 2>&1; then
|
||||
missing_linux_deps=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# normal stuff, this mostly for bare docker images
|
||||
if command -v apt-get > /dev/null 2>&1; then
|
||||
if [[ "$missing_linux_deps" -eq 0 ]]; then
|
||||
# the native package managers are slow, so skip if we canNM_CONNECTIONS_DIRS
|
||||
echo "[ ] system packages already installed t=$SECONDS"
|
||||
elif command -v apt-get > /dev/null 2>&1; then
|
||||
$SUDO apt-get update
|
||||
$SUDO apt-get install -y --no-install-recommends ca-certificates build-essential curl libcurl4-openssl-dev locales git
|
||||
elif command -v dnf > /dev/null 2>&1; then
|
||||
|
||||
Reference in New Issue
Block a user