echo "Using conditional statement to create a project directory and project"

# Variable section
export project_dir=$HOME/vscode  # change vscode to different name to test git clone
export project=$project_dir/repository_1  # change APCSP to name of project from git clone
export project_repo="https://github.com/gwang1224/repository_1.git"  # change to project of choice

cd ~    # start in home directory

# Conditional block to make a project directory
if [ ! -d $project_dir ]
then 
    echo "Directory $project_dir does not exists... makinng 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."
Using conditional statement to create a project directory and project
Directory /Users/gracewang/vscode exists.
Directory /Users/gracewang/vscode/repository_1 exists.
echo "Using conditional statement to create a project directory and project"

# Variable section
export project_dir=$HOME/hacks  # change vscode to different name to test git clone
export project=$project_dir/APCSP  # change APCSP to name of project from git clone
export project_repo="https://github.com/nighthawkcoders/APCSP.git"  # change to project of choice

cd ~    # start in home directory

# Conditional block to make a project directory
if [ ! -d $project_dir ]
then 
    echo "Directory $project_dir does not exists... makinng 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."
Using conditional statement to create a project directory and project
Directory /Users/gracewang/hacks does not exists... makinng directory /Users/gracewang/hacks
Directory /Users/gracewang/hacks exists.
Directory /Users/gracewang/hacks/APCSP does not exists... cloning https://github.com/nighthawkcoders/APCSP.git
Cloning into 'APCSP'...
remote: Enumerating objects: 9627, done.        
remote: Counting objects: 100% (1202/1202), done.        
remote: Compressing objects: 100% (454/454), done.        
remote: Total 9627 (delta 752), reused 1171 (delta 722), pack-reused 8425        
Receiving objects: 100% (9627/9627), 16.53 MiB | 16.57 MiB/s, done.
Resolving deltas: 100% (5247/5247), done.
Directory /Users/gracewang/hacks/APCSP exists.
echo "Navigate to project, then navigate to area wwhere files were cloned"
cd $project
pwd

echo ""
echo "list top level or root of files with project pulled from github"
ls
Navigate to project, then navigate to area wwhere files were cloned
/Users/gracewang/vscode/repository_1

list top level or root of files with project pulled from github
2022-05-15-07-21-16.png	_config.yml		_sass
2022-05-15-07-24-25.png	_fastpages_docs		_word
2022-05-15-07-25-15.png	_includes		assets
Gemfile			_layouts		docker-compose.yml
LICENSE			_notebooks		images
Makefile		_pages			index.html
README.md		_plugins
_action_files		_posts
python --version
python2 --version
Python 3.9.12
Python 2.7.18
echo "Jupyter Check"
test="jupyter" # keyword
check=`conda list | grep $test` # run command
n=${#check} # determine length

if [[ ${n} > 0 ]];  # testt length
then # greater than zero
    echo "$check"
else # less than zero
    echo "$test not found"
fi
Jupyter Check
jupyter                   1.0.0            py39hecd8cb5_7  
jupyter_client            6.1.12             pyhd3eb1b0_0  
jupyter_console           6.4.0              pyhd3eb1b0_0  
jupyter_core              4.9.2            py39hecd8cb5_0  
jupyter_server            1.13.5             pyhd3eb1b0_0  
jupyterlab                3.3.2              pyhd3eb1b0_0  
jupyterlab_pygments       0.1.2                      py_0  
jupyterlab_server         2.10.3             pyhd3eb1b0_1  
jupyterlab_widgets        1.0.0              pyhd3eb1b0_1  
jupyter --version
jupyter kernelspec list
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/gracewang/.vscode/extensions/ms-toolsai.jupyter-2022.7.1102252217/temp/jupyter/kernels/python3106jvsc74a57bd0b0fa6594d8f4cbf19f97940f81e996739fb7646882a419484c72d19e05852a7e
  bash                                                                                      /Users/gracewang/Library/Jupyter/kernels/bash
  javascript                                                                                /Users/gracewang/Library/Jupyter/kernels/javascript
  python3                                                                                   /Users/gracewang/opt/anaconda3/share/jupyter/kernels/python3