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

# Variable section
export project_direct=$HOME/vscode  # change vscode to different name to test git clone
export project=$project_direct/temprepo  # changed it to an empty repository
export project_repo="https://github.com/B-G101/temp-repo.git"  # change to project of choice

cd ~    # start in home directory

# Conditional block to make a project directory
if [ ! -d $project_direct ]
then 
    echo "Directory $project_direct does not exists... makinng directory $project_direct"
    mkdir -p $project_direct
fi
echo "Directory $project_direct 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_direct
    git clone $project_repo
    cd ~
fi
echo "Directory $project exists."
Using conditional statement to create a project directory and project
Directory /home/briag/vscode exists.
Directory /home/briag/vscode/temprepo does not exists... cloning https://github.com/B-G101/temp-repo.git
fatal: destination path 'temp-repo' already exists and is not an empty directory.
Directory /home/briag/vscode/temprepo exists.
# echo command is a print statement

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

echo ""
echo "list again with hidden files pulled from github"
ls -a   # hidden files flag, many shell commands have flags

cd /home/briag/vscode/APCSA-BRIA-1
echo ""
echo "list all files in long format"
ls -al   # all files and long listing
Navigate to project, then navigate to area wwhere files were cloned
bash: cd: /home/briag/vscode/temprepo: No such file or directory
/home/briag

list top level or root of files with project pulled from github
Anaconda3-2022.05-Linux-x86_64.sh  ijava-1.3.0.zip  java
anaconda3                          install.py       vscode

list again with hidden files pulled from github
.              .gitconfig   .npm                               ijava-1.3.0.zip
..             .ipython     .profile                           install.py
.bash_history  .jupyter     .sudo_as_admin_successful          java
.bash_logout   .landscape   .vscode-server                     vscode
.bashrc        .local       .wget-hsts
.cache         .motd_shown  Anaconda3-2022.05-Linux-x86_64.sh
.conda         .node-gyp    anaconda3

list all files in long format
total 488
drwxr-xr-x 16 briag briag   4096 Aug 28 16:35 .
drwxr-xr-x  5 briag briag   4096 Aug 28 16:35 ..
-rw-r--r--  1 briag briag    432 Aug 28 14:16 .devcontainer.json
drwxr-xr-x  7 briag briag   4096 Aug 28 16:47 .git
-rw-r--r--  1 briag briag     85 Aug 28 14:16 .gitattributes
drwxr-xr-x  4 briag briag   4096 Aug 28 16:35 .github
-rw-r--r--  1 briag briag    175 Aug 28 14:16 .gitignore
-rw-r--r--  1 briag briag 207007 Aug 28 14:16 2022-05-15-07-21-16.png
-rw-r--r--  1 briag briag  90979 Aug 28 14:16 2022-05-15-07-24-25.png
-rw-r--r--  1 briag briag  81691 Aug 28 14:16 2022-05-15-07-25-15.png
-rw-r--r--  1 briag briag   1347 Aug 28 14:16 Gemfile
-rw-r--r--  1 briag briag  11552 Aug 28 14:16 LICENSE
-rw-r--r--  1 briag briag   1475 Aug 28 14:16 Makefile
-rw-r--r--  1 briag briag   3631 Aug 28 14:16 README.md
drwxr-xr-x  2 briag briag   4096 Aug 28 16:35 _action_files
-rw-r--r--  1 briag briag   3807 Aug 28 14:16 _config.yml
drwxr-xr-x  2 briag briag   4096 Aug 28 16:35 _fastpages_docs
drwxr-xr-x  2 briag briag   4096 Aug 28 16:35 _includes
drwxr-xr-x  2 briag briag   4096 Aug 28 16:35 _layouts
drwxr-xr-x  4 briag briag   4096 Aug 28 16:35 _notebooks
drwxr-xr-x  2 briag briag   4096 Aug 28 16:35 _pages
drwxr-xr-x  2 briag briag   4096 Aug 28 16:35 _plugins
drwxr-xr-x  2 briag briag   4096 Aug 28 16:35 _posts
drwxr-xr-x  3 briag briag   4096 Aug 28 16:35 _sass
drwxr-xr-x  2 briag briag   4096 Aug 28 16:35 _word
drwxr-xr-x  4 briag briag   4096 Aug 28 16:35 assets
-rw-r--r--  1 briag briag   1180 Aug 28 14:16 docker-compose.yml
drwxr-xr-x  3 briag briag   4096 Aug 28 16:35 images
-rw-r--r--  1 briag briag    636 Aug 28 14:16 index.html
# Looks into the post directory and shows all the posts


echo "Look for posts"
export posts=$project/_posts  # _posts inside project
cd $posts  # this should exist per fastpages
pwd  # present working directory

cd /home/briag/vscode/APCSA-BRIA-1/_posts
ls -l  # list posts
Look for posts
bash: cd: /home/briag/vscode/temprepo/_posts: No such file or directory
/home/briag/vscode/APCSA-BRIA-1/_notebooks
total 8
-rw-r--r-- 1 briag briag 2069 Aug 28 14:16 2020-01-14-test-markdown-post.md
-rw-r--r-- 1 briag briag  737 Aug 28 14:16 README.md
echo "Look for notebooks"
export notebooks=$project/_notebooks  # _notebooks is inside project
cd $notebooks   # this should exist per fastpages
pwd  # present working directory

cd /home/briag/vscode/APCSA-BRIA-1/_notebooks
ls -l  # list notebooks
Look for notebooks
bash: cd: /home/briag/vscode/temprepo/_notebooks: No such file or directory
/home/briag/vscode/APCSA-BRIA-1
total 3116
-rw-r--r-- 1 briag briag 3163230 Aug 28 14:16 2020-02-20-test.ipynb
-rw-r--r-- 1 briag briag     428 Aug 28 16:45 2022-08-28-bash.ipynb
-rw-r--r-- 1 briag briag    7964 Aug 28 15:59 2022-08-28-primitive-types.ipynb
-rw-r--r-- 1 briag briag     784 Aug 28 14:16 README.md
drwxr-xr-x 2 briag briag    4096 Aug 28 16:35 ghtop_images
drwxr-xr-x 2 briag briag    4096 Aug 28 16:35 my_icons
echo "Show the shell environment variables, key on left of equal value on right"
echo ""

env
Show the shell environment variables, key on left of equal value on right

SHELL=/bin/bash
PYTHONUNBUFFERED=1
project=/home/briag/vscode/temprepo
CONDA_EXE=/home/briag/anaconda3/bin/conda
_CE_M=
WSL_DISTRO_NAME=Ubuntu
ELECTRON_RUN_AS_NODE=1
VSCODE_AMD_ENTRYPOINT=vs/workbench/api/node/extensionHostProcess
NAME=BG101
PWD=/home/briag/vscode/APCSA-BRIA-1/_posts
LOGNAME=briag
CONDA_PREFIX=/home/briag/anaconda3
HOME=/home/briag
LANG=C.UTF-8
WSL_INTEROP=/run/WSL/6221_interop
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
CONDA_PROMPT_MODIFIER=(base) 
PYDEVD_USE_FRAME_EVAL=NO
posts=/home/briag/vscode/temprepo/_posts
LESSCLOSE=/usr/bin/lesspipe %s %s
VSCODE_HANDLES_SIGPIPE=true
TERM=xterm-256color
_CE_CONDA=
LESSOPEN=| /usr/bin/lesspipe %s
USER=briag
project_direct=/home/briag/vscode
PYTHONIOENCODING=utf-8
notebooks=/home/briag/vscode/temprepo/_notebooks
CONDA_SHLVL=1
SHLVL=1
PAGER=cat
project_repo=https://github.com/B-G101/temp-repo.git
VSCODE_CWD=/mnt/c/Users/briag/AppData/Local/Programs/Microsoft VS Code
CONDA_PYTHON_EXE=/home/briag/anaconda3/bin/python
PS1=[PEXP\[\]ECT_PROMPT>
CONDA_DEFAULT_ENV=base
WSLENV=VSCODE_WSL_EXT_LOCATION/up
VSCODE_WSL_EXT_LOCATION=/mnt/c/Users/briag/.vscode/extensions/ms-vscode-remote.remote-wsl-0.66.3
PATH=/home/briag/anaconda3/bin:/home/briag/anaconda3/condabin:/home/briag/.vscode-server/bin/e4503b30fc78200f846c62cf8091b76ff5547662/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/Common Files/Oracle/Java/javapath:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0:/mnt/c/WINDOWS/System32/OpenSSH:/mnt/c/Program Files/Git/cmd:/mnt/c/Users/briag/AppData/Local/Programs/Python/Python39/Scripts:/mnt/c/Users/briag/AppData/Local/Programs/Python/Python39:/mnt/c/Users/briag/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/briag/AppData/Local/Programs/Microsoft VS Code/bin
VSCODE_NLS_CONFIG={"locale":"en","availableLanguages":{}}
HOSTTYPE=x86_64
VSCODE_HANDLES_UNCAUGHT_ERRORS=true
OLDPWD=/home/briag/vscode/APCSA-BRIA-1/_notebooks
VSCODE_IPC_HOOK_CLI=/tmp/vscode-ipc-06cc32ce-ad22-4fe0-8a01-4dfdf25dc8cb.sock
_=/usr/bin/env
cd $project

echo ""
echo "show the secrets of .git"
cd .git
ls -l

echo ""
echo "look at config file"
cat config
bash: cd: /home/briag/vscode/temprepo: No such file or directory

show the secrets of .git
bash: cd: .git: No such file or directory
total 8
-rw-r--r-- 1 briag briag 2069 Aug 28 14:16 2020-01-14-test-markdown-post.md
-rw-r--r-- 1 briag briag  737 Aug 28 14:16 README.md

look at config file
cat: config: No such file or directory