Skip to content
Snippets Groups Projects

Resolve L2SS-218 "Move existing tooling to bootstrap dir"

Merged Resolve L2SS-218 "Move existing tooling to bootstrap dir"
All threads resolved!
Merged Thomas Juerges requested to merge L2SS-218-move_existing_tooling_to_bootstrap_dir into master
All threads resolved!
Files
12
+ 36
0
#! /usr/bin/env bash
venv=${VIRTUAL_ENV:?This is currently not a Python3 venv! Will not upgrade venv packages.}
echo -e "\nFound a Python3 venv in \"${VIRTUAL_ENV}\".\nWill now proceed with package upgrades.\n"
pip="python3 -m pip"
upgrade_command="${pip} install --upgrade"
if [ -z ${OS} ]; then
OS=$(uname)
fi
if [ ${OS} = Darwin ]; then
find=gfind
else
find=find
fi
function upgrade()
{
if [ ${#} -ge 1 ]; then
echo "Upgrading ${@}..."
${upgrade_command} ${@}
if [ ${?} -eq 0 ]; then
echo -e "\nUpgrading ${@} done.\n\nNow \"deactivate\" and \"source ${venv}/bin/activate\".\n"
else
echo -e "\nSomething went wrong during the upgrade.\nCheck the output!\n"
fi
else
echo -e "\nNo package for upgrading given.\n"
fi
}
upgrade pip wheel
installed_packages=$(for i in $(python3 -m pip freeze | cut -d'=' -f1); do printf "%s " ${i}; done)
upgrade ${installed_packages}
Loading