From d4ce31f3e5b8aaeefdf41d5da1e11d33c26a9779 Mon Sep 17 00:00:00 2001 From: thomas Date: Thu, 5 Mar 2026 14:50:35 +0100 Subject: [PATCH] Actualiser detect.sh --- detect.sh | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/detect.sh b/detect.sh index bb6e5ba..6a9474b 100644 --- a/detect.sh +++ b/detect.sh @@ -1,21 +1,24 @@ #!/usr/bin/env bash -if command -v docker &>/dev/null +# Si docker existe -> apps docker +if command -v docker >/dev/null 2>&1 then echo docker - exit + exit 0 fi -if command -v apt &>/dev/null -then - echo apt - exit -fi - -if command -v apk &>/dev/null +# Sinon si apk -> alpine +if command -v apk >/dev/null 2>&1 then echo apk - exit + exit 0 +fi + +# Sinon apt (debian / ubuntu) +if command -v apt-get >/dev/null 2>&1 +then + echo apt + exit 0 fi echo unknown \ No newline at end of file