From 3b9e3db2c72b972f49c7dae77ff7f2b48fb549a5 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 8 Dec 2021 23:16:11 +0100 Subject: [PATCH] Update automatic_packages.sh --- zzz_templates/automatic_packages.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/zzz_templates/automatic_packages.sh b/zzz_templates/automatic_packages.sh index e3a605b12..e9c067237 100644 --- a/zzz_templates/automatic_packages.sh +++ b/zzz_templates/automatic_packages.sh @@ -77,9 +77,12 @@ for files in "/scripts" "/etc/cont-init.d"; do fi if [[ $(grep -rnw "$files/" -e 'lastversion') ]]; then - [ $PACKMANAGER = "apk" ] && apk add --no-cache py3-pip && pip install lastversion - [ $PACKMANAGER = "apt" ] && apt-get install -y python-pip \ - && pip install lastversion + [ $PACKMANAGER = "apk" ] && [[ $(pip -V) ]] \ + || apk add --no-cache py3-pip \ + && pip install lastversion + [ $PACKMANAGER = "apt" ] && [[ $(pip -V) ]] \ + || apt-get install -y python-pip \ + && pip install lastversion fi done