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/amitha/vscode exists.
Directory /Users/amitha/vscode/repository_1 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/amitha/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