This commit is contained in:
2023-09-17 17:37:44 -05:00
parent 40087f40e7
commit 1edf9b1c8b
2 changed files with 5 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
action="$1"
FOLDER='/opt/idssys/linupx'
VERS='6.60.12-09032023'
VERS='6.60.13-09172023'

View File

@@ -148,13 +148,10 @@ PIPUPGRADE() {
${APTFUNC} install jq -y
fi
[ "${1}" == "ii" ] && ii=' --ignore-installed' || ii=''
if [ "$EUID" -ne 0 ]; then
sudo python3 -m pip install --upgrade pip
sudo pip3 list --outdated --format=json | jq -r '.[] | "\(.name)==\(.latest_version)"' | xargs -n1 pip3 install -U
else
python3 -m pip install --upgrade pip
pip3 list --outdated --format=json | jq -r '.[] | "\(.name)==\(.latest_version)"' | xargs -n1 pip3 install -U
fi
pipupdates=$(pip3 list --outdated --format=json | jq -r '.[] | "\(.name)==\(.latest_version)"')
python3 -m pip install --upgrade pip
[ "${pipupdates}" != "" ] && echo ${pipupdates} | xargs -n1 pip3 install${ii} -U || echo -e "${idsCL[LightCyan]}There are no Python(Pip) updates available, life is good!${idsCL[Default]}"
echo
echo -e "${idsCL[Green]}Python-Pip Upgrades has completed${idsCL[Default]}"
[ ${action-x} ] && exit 0