Skip to content

Instantly share code, notes, and snippets.

@DrBluefall
Created July 16, 2019 23:10
Show Gist options
  • Save DrBluefall/4e781d3c4256bb40838114922cfb56f8 to your computer and use it in GitHub Desktop.
Save DrBluefall/4e781d3c4256bb40838114922cfb56f8 to your computer and use it in GitHub Desktop.
startup(){
if [ $1 = "prisbot" ];
then
cd /Users/prismarine/Desktop/projects/ProjectPrismarine
source .venv/bin/activate
if [ $# -eq 2 ];
then
git checkout $2
else
git checkout master
fi
pip install -r requirements.txt
python3 core.py
echo -e "startup: \e[38;5;10mLogout complete - returning to root directory\e[0m."
deactivate
cd ~
elif [ $1 = "otd" ];
then
cd /Users/prismarine/Desktop/projects/offthedialbot
source .venv/bin/activate
if [ $# -eq 2 ];
then
git checkout $2
else
git checkout master
fi
pip install -r requirements.txt
cd src
python3 offthedialbot.py
echo -e "startup: \e[38;5;10mLogout complete - returning to root directory\e[0m."
deactivate
cd ~
else
echo -e "startup: \e[38;5;9mInvalid Project\e[0m: $1"
fi
}
edit(){
if [ $1 = "prisbot" ];
then
cd /Users/prismarine/Desktop/projects/ProjectPrismarine
source .venv/bin/activate
git checkout $2
pip install -r requirements.txt
vscode /Users/prismarine/Desktop/projects/ProjectPrismarine
elif [ $1 = "otd" ];
then
cd /Users/prismarine/Desktop/projects/offthedialbot
source .venv/bin/activate
if [ $# -eq 2 ];
then
git checkout $2
else
git checkout master
fi
pip install -r requirements.txt
vscode /Users/prismarine/Desktop/projects/offthedialbot
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment