mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
35 lines
589 B
Bash
Executable File
35 lines
589 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Minimum requirements to run ./build --download-dependencies
|
|
set -ex
|
|
if [ $# -eq 1 ]; then
|
|
y=-y
|
|
else
|
|
y=
|
|
fi
|
|
if [ true = "$LKMC_IN_DOCKER" ]; then
|
|
indocker=true
|
|
else
|
|
indocker=false
|
|
fi
|
|
if "$indocker"; then
|
|
sudo=
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
else
|
|
sudo=sudo
|
|
fi
|
|
if "$indocker"; then
|
|
$sudo apt update
|
|
apt install -y software-properties-common
|
|
add-apt-repository -y ppa:git-core/ppa
|
|
$sudo apt update
|
|
git='git=1:2.*'
|
|
else
|
|
git=git
|
|
fi
|
|
$sudo apt-get install $y \
|
|
$git \
|
|
python3 \
|
|
python3-pip \
|
|
;
|
|
python3 -m pip install -r requirements.txt
|