From 823bc90eb1325ab6ff8d703e99c08a669a11246f Mon Sep 17 00:00:00 2001 From: missytake Date: Fri, 16 May 2025 21:24:46 +0200 Subject: [PATCH] cmdeploy: make it work without bash Co-authored-by: link2xt --- scripts/initenv.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/scripts/initenv.sh b/scripts/initenv.sh index 779ebd89..b4dab1bc 100755 --- a/scripts/initenv.sh +++ b/scripts/initenv.sh @@ -1,13 +1,16 @@ -#!/bin/bash +#!/bin/sh set -e -if [[ $(lsb_release -is 2> /dev/null) == "Ubuntu" || $(lsb_release -is 2> /dev/null) == "Debian" ]] -then - if [ $(dpkg -l | grep python3-dev 2>&1 /dev/null) ] - then - echo "You need to install python3-dev for installing the other dependencies." - exit 1 - fi +if command -v lsb_release 2>&1 >/dev/null; then + case "$(lsb_release -is)" in + Ubuntu | Debian ) + if ! dpkg -l | grep python3-dev 2>&1 >/dev/null + then + echo "You need to install python3-dev for installing the other dependencies." + exit 1 + fi + ;; + esac fi python3 -m venv --upgrade-deps venv