mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
New explicit Docker selection based on environment variable
Everything else breaks after a few years I give up.
This commit is contained in:
10
setup
10
setup
@@ -6,14 +6,18 @@ if [ $# -eq 1 ]; then
|
||||
else
|
||||
y=
|
||||
fi
|
||||
indocker="$(set +e; grep -q docker /proc/1/cgroup; echo $?)"
|
||||
if [ "$indocker" -eq 0 ]; then
|
||||
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" -eq 0 ]; then
|
||||
if "$indocker"; then
|
||||
$sudo apt update
|
||||
apt install -y software-properties-common
|
||||
add-apt-repository -y ppa:git-core/ppa
|
||||
|
||||
Reference in New Issue
Block a user