Skip to content

Commit

Permalink
Change all log messages to the same style
Browse files Browse the repository at this point in the history
  • Loading branch information
navistonks committed Jun 9, 2024
1 parent 350f916 commit a3f00a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
15 changes: 7 additions & 8 deletions tools/install_python_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ POETRY_INSTALLED="false"

if ! command -v "pyenv" > /dev/null 2>&1; then
if ask "Install pyenv?"; then
echo "pyenv install ..."
echo "Installing pyenv..."
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
PYENV_PATH_SETUP="export PATH=\$HOME/.pyenv/bin:\$HOME/.pyenv/shims:\$PATH"
PYENV_INSTALLED="true"
Expand All @@ -36,7 +36,7 @@ else
fi

if [[ "$PYENV_INSTALLED" == "true" ]] && ([ -z "$PYENV_SHELL" ] || [ -n "$PYENV_PATH_SETUP" ]); then
echo "pyenvrc setup ..."
echo "Setting up pyenvrc..."
cat <<EOF > "${HOME}/.pyenvrc"
if [ -z "\$PYENV_ROOT" ]; then
$PYENV_PATH_SETUP
Expand Down Expand Up @@ -65,21 +65,21 @@ if [[ "$PYENV_INSTALLED" == "true" ]] && (! pyenv prefix ${PYENV_PYTHON_VERSION}
# no pyenv update on mac
if [ "$(uname)" == "Linux" ]; then
if ask "Update pyenv?"; then
echo "pyenv update ..."
echo "Updating pyenv..."
pyenv update
fi
fi

if ask "Install python ${PYENV_PYTHON_VERSION}?"; then
echo "python ${PYENV_PYTHON_VERSION} install ..."
echo "Installing python ${PYENV_PYTHON_VERSION} ..."
CONFIGURE_OPTS="--enable-shared" pyenv install -f ${PYENV_PYTHON_VERSION}
fi
fi

[[ "$PYENV_INSTALLED" == "true" ]] && eval "$(pyenv init --path)"

if ask "Update pip?"; then
echo "update pip"
echo "Updating pip..."
pip install pip==24.0
fi

Expand All @@ -106,10 +106,9 @@ if [[ "$(uname)" == 'Darwin' ]]; then
fi
fi


if [[ "$POETRY_INSTALLED" == "true" ]] && [[ "$PYENV_INSTALLED" == "true" ]]; then
if ask "Install openpilot python dependencies?"; then
echo "pip packages install..."
echo "Installing pip packages..."
poetry install --no-cache --no-root
pyenv rehash
fi
Expand All @@ -123,7 +122,7 @@ fi

if [ "$(uname)" != "Darwin" ] && [ -e "$ROOT/.git" ]; then
if ask "Install git pre-commit hooks?"; then
echo "pre-commit hooks install..."
echo "Installing git pre-commit hooks..."
$RUN pre-commit install
$RUN git submodule foreach pre-commit install
fi
Expand Down
5 changes: 4 additions & 1 deletion tools/install_ubuntu_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ fi

# Install common packages
function install_ubuntu_common_requirements() {
echo "Installing common packages..."
$SUDO apt-get update
$SUDO apt-get install -y --no-install-recommends \
ca-certificates \
Expand Down Expand Up @@ -84,7 +85,7 @@ function install_extra_packages() {
}

function install_tools() {
echo "Installing development tools"
echo "Installing development tools..."
# TODO: Add other packages
$SUDO apt-get install -y --no-install-recommends valgrind
}
Expand All @@ -93,6 +94,7 @@ function install_tools() {
function install_ubuntu_lts_latest_requirements() {
install_ubuntu_common_requirements

echo "Installing Ubuntu LTS requirements..."
$SUDO apt-get install -y --no-install-recommends \
g++-12 \
qtbase5-dev \
Expand All @@ -106,6 +108,7 @@ function install_ubuntu_lts_latest_requirements() {
function install_ubuntu_focal_requirements() {
install_ubuntu_common_requirements

echo "Installing Ubuntu Focal requirements..."
$SUDO apt-get install -y --no-install-recommends \
libavresample-dev \
qt5-default \
Expand Down

0 comments on commit a3f00a0

Please sign in to comment.