Tool Check
Tool Check
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."
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."
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
python --version
python2 --version
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 --version
jupyter kernelspec list