ARTEX - AI autonomous penetration testing system (English translation; upstream: Autumn-27/ARTEX, AGPL-3.0)
Go aiai-agentsautonomous-agentsbug-bountydockergolanglinuxllmmcpnextjspenetration-testingpentestpostgresqlreareactred-teamsecuritysecurity-automationsqlitetypescript
fix(install): match deb822 docker.sources across lines
jackybabesc90e2c980cd0
diff --git a/install.sh b/install.shindex 50f49fe..ce73292 100755--- a/install.sh+++ b/install.sh@@ -61,9 +61,14 @@ install_docker_linux(){|| die "automatic Docker install is not supported on '${id:-unknown}'; please install docker + the compose plugin yourself and retry"info "'${id:-unknown}' (like: ${id_like:-n/a}) is not supported by get.docker.com; installing from the distro's apt repos"# Drop a broken repo left by an earlier get.docker.com run (it fails every apt update).+ # Match the URI and the distro id anywhere in the file: in a one-line .list entry+ # they share a line, but in a deb822 .sources file the URIs and Suites fields are+ # on separate lines. -w keeps "kali" matching inside "kali-rolling".local ffor f in /etc/apt/sources.list.d/docker.list /etc/apt/sources.list.d/docker.sources; do- if [ -f "$f" ] && grep -q "download.docker.com/linux/debian.*${id}" "$f" 2>/dev/null; then+ if [ -n "$id" ] && [ -f "$f" ] \+ && grep -qF "download.docker.com/linux/debian" "$f" 2>/dev/null \+ && grep -qwF "$id" "$f" 2>/dev/null; thenwarn "removing broken Docker repo $f"sudo rm -f "$f"fi