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