From 51a72a38ae244af7fd124f4201c3cbb6460c20bf Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 9 Dec 2021 22:48:11 +0100 Subject: [PATCH] Update automatic_packages.sh --- zzz_templates/automatic_packages.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/zzz_templates/automatic_packages.sh b/zzz_templates/automatic_packages.sh index dbe610ca6..31b989222 100644 --- a/zzz_templates/automatic_packages.sh +++ b/zzz_templates/automatic_packages.sh @@ -94,10 +94,16 @@ for files in "/etc/cont-init.d" "/scripts"; do [ $PACKMANAGER = "apt" ] && PACKAGES="$PACKAGES sqlite3" fi - if [[ $(grep -rnw "$files/" -e 'pip') ]]; then + if [[ $(grep -rnw "$files/" -e 'pip') ]] && [[ ! $(pip -V &>/dev/null) ]]; then [ $VERBOSE = true ] && echo "pip found" - [ $PACKMANAGER = "apk" ] && [[ $(pip -V) ]] || PACKAGES="$PACKAGES py3-pip" - [ $PACKMANAGER = "apt" ] && [[ $(pip -V) ]] || PACKAGES="$PACKAGES python-pip" + [ $PACKMANAGER = "apk" ] && PACKAGES="$PACKAGES py3-pip" + [ $PACKMANAGER = "apt" ] && PACKAGES="$PACKAGES python-pip" + fi + + if [[ $(grep -rnw "$files/" -e 'wget') ]]; then + [ $VERBOSE = true ] && echo "wget found" + [ $PACKMANAGER = "apk" ] && PACKAGES="$PACKAGES wget" + [ $PACKMANAGER = "apt" ] && PACKAGES="$PACKAGES wget" fi done