Python, Java, and Jupyter Check

python --version
python2 --version
java --version
javac --version
jupyter --version
jupyter kernelspec list
Python 3.9.12
Python 2.7.18
openjdk 17.0.4 2022-07-19
OpenJDK Runtime Environment Temurin-17.0.4+8 (build 17.0.4+8)
OpenJDK 64-Bit Server VM Temurin-17.0.4+8 (build 17.0.4+8, mixed mode, sharing)
javac 17.0.4
Selected Jupyter core packages...
IPython          : 8.2.0
ipykernel        : 6.9.1
ipywidgets       : 7.6.5
jupyter_client   : 6.1.12
jupyter_core     : 4.9.2
jupyter_server   : 1.13.5
jupyterlab       : 3.3.2
nbclient         : 0.5.13
nbconvert        : 6.4.4
nbformat         : 5.3.0
notebook         : 6.4.8
qtconsole        : 5.3.0
traitlets        : 5.1.1
Available kernels:
  python3106jvsc74a57bd0b0fa6594d8f4cbf19f97940f81e996739fb7646882a419484c72d19e05852a7e    /Users/sri/.vscode/extensions/ms-toolsai.jupyter-2022.7.1102252217/temp/jupyter/kernels/python3106jvsc74a57bd0b0fa6594d8f4cbf19f97940f81e996739fb7646882a419484c72d19e05852a7e
  bash                                                                                      /Users/sri/Library/Jupyter/kernels/bash
  java                                                                                      /Users/sri/Library/Jupyter/kernels/java
  javascript                                                                                /Users/sri/Library/Jupyter/kernels/javascript
  python3                                                                                   /Users/sri/opt/anaconda3/share/jupyter/kernels/python3

Conda Installation Check

test=$(conda list | grep -c "jupyter")

if [ $test -gt 0 ]; then
    echo "Conda and jupyter were correctly installed."
else 
    echo "Conda and jupter were incorrectly installed."
fi
Conda and jupyter were correctly installed.

Project Directory Checks

echo "Creating a project directory and project"

cd ~    # start in home directory

# Conditional block to make a project directory
if [ ! -d $project_dir ]
then 
    echo "Directory $project_dir does not exists... making a new directory $project_dir"
    mkdir -p $project_dir
fi
echo "Directory $project_dir exists." 

# Conditional block to git clone a project from project_repo
if [ ! -d $project ]
then
    echo "Directory $project does not exists... cloning $project_repo"
    cd $project_dir
    git clone $project_repo
    cd ~
fi
echo "Directory $project exists."
Creating a project directory and project
Directory /Users/sri/vscode exists.
Directory /Users/sri/vscode/APCSP exists.