Bash notebook
A tutorial of fastpages for Jupyter notebooks.
echo "Using conditional statement to create a project directory and project"
export project_dir=$/mnt/c/Users/sarah/vscode
export project=$project_dir/VSCode-Fastpages
export project_repo="https://github.com/A1234l/VSCode-Fastpages"
cd ~
if [ ! -d $project_dir ]
then
echo "Directory $project_dir does not exists... making directory $project_dir"
mkdir -p $project_dir
fi
echo "Directory $project_dir exists."
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."
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
echo ""
echo "list all files in long format"
ls -al
echo "Look for posts"
export posts=$project/_posts
cd $posts
pwd
ls -l
echo "Look for notebooks"
export notebooks=$project/_notebooks
cd $notebooks
pwd
ls -l
echo "Look for images in notebooks, print working directory, list files"
cd $notebooks/images
pwd
ls -l
echo "Navigate to project, then navigate to area wwhere files were cloned"
cd $project
echo "show the contents of README.md"
echo ""
cat README.md
echo ""
echo "end of README.md"
echo "Show the shell environment variables, key on left of equal value on right"
echo ""
env
cd $project
echo ""
echo "show the secrets of .git"
cd .git
ls -l
echo ""
echo "look at config file"
cat config
Hacks
- We can use the "cat" command to see the files of the tools. This way, we can be able to verify its version and to see if the tool we downloaded is the correct one.
- We can also use the "export" and "cat" commands to verify things with Anaconda. Since Anaconda is just another file, we can do the same commands for it.
- You can be able to update a repository by using the ".git" command to create a connection with your computer to Github.
- I'm not really sure how to automate installation of something, but my guess is that you can use the .git/config command to use the setting files.