setup-cockpit/SetupCockpit/clone_projects.sh

205 lines
5.8 KiB
Bash

#!/bin/sh
## This script clones all the different repos
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
ORANGE=$(tput setaf 3)
NC=$(tput sgr0)
##################
# REPOS ON LIME2 #
##################
echo "Setting up Keepass..."
if [ -e ~/Keepass ]; then
echo "Keepass is already there, updating..."
cd ~/Keepass && git pull
else
echo "Cloning new Keepass..."
cd && git clone ssh://flyingscorpio@2px.info.tm/~/repos/Keepass.git
fi
echo "Setting up VimConf..."
if [ -e ~/VimConf ]; then
echo "VimConf is already there, updating..."
cd ~/VimConf && git pull
else
echo "Cloning new VimConf..."
cd && git clone ssh://flyingscorpio@2px.info.tm/~/repos/VimConf.git
fi
cd ~/VimConf && /bin/bash ~/VimConf/update.sh
echo "Setting up Lessons..."
if [ -e ~/Lessons ]; then
echo "Lessons is already there, updating..."
cd ~/Lessons && git pull
else
echo "Cloning new Lessons..."
cd && git clone ssh://flyingscorpio@2px.info.tm/~/repos/Lessons.git
fi
echo "Setting up RootMe..."
if [ -e ~/RootMe ]; then
echo "RootMe is already there, updating..."
cd ~/RootMe && git pull
else
echo "Cloning new RootMe..."
cd && git clone ssh://flyingscorpio@2px.info.tm/~/repos/RootMe.git
fi
echo "Setting up PersonnalScripts..."
if [ -e ~/PersonnalScripts ]; then
echo "PersonnalScripts is already there, updating..."
cd ~/PersonnalScripts && git pull
else
echo "Cloning new PersonnalScripts..."
cd && git clone ssh://flyingscorpio@2px.info.tm/~/repos/PersonnalScripts.git
fi
###################
# REPOS ON GITLAB #
###################
if [ ! -e ~/SRC ]; then
mkdir ~/SRC
echo "Created ~/SRC"
fi
echo "Setting up e2li/depydoc..."
if [ -e ~/SRC/depydoc ]; then
echo "depydoc is already there, updating..."
cd ~/SRC/depydoc && git pull
else
echo "Cloning new depydoc..."
cd ~/SRC && git clone https://gitlab.com/e2li/depydoc.git
fi
echo "Setting up 2px..."
if [ -e ~/SRC/2px ]; then
echo "2px is already there, updating..."
cd ~/SRC/2px && git pull
else
echo "Cloning new 2px..."
cd ~/SRC && git clone https://gitlab.com/flyingscorpio/2px.git
cd ~/SRC/2px && python3 -m venv env
echo "
# Set own environment variables for Django
DJANGO_USER='flyingscorpio'
export DJANGO_USER
DJANGO_PASSWORD='ribosome66'
export DJANGO_PASSWORD
DJANGO_SECRET_KEY='q+hci0d5y90q)k07f@1k3qzr&w=@89n(0z0ukp)_iu(g9iws0r'
export DJANGO_SECRET_KEY" >> ~/SRC/2px/env/bin/activate
fi
echo "Setting up BlurMySearches..."
if [ -e ~/SRC/BlurMySearches ]; then
echo "BlurMySearches is already there, updating..."
cd ~/SRC/BlurMySearches && git pull
else
echo "Cloning new BlurMySearches..."
cd ~/SRC && git clone https://gitlab.com/flyingscorpio/BlurMySearches.git
fi
echo "Setting up JsonToPython..."
if [ -e ~/SRC/JsonToPython ]; then
echo "JsonToPython is already there, updating..."
cd ~/SRC/JsonToPython && git pull
else
echo "Cloning new JsonToPython..."
cd ~/SRC && git clone https://gitlab.com/flyingscorpio/JsonToPython.git
fi
echo "Setting up LVEL-website..."
if [ -e ~/SRC/LVEL-website ]; then
echo "LVEL-website is already there, updating..."
cd ~/SRC/LVEL-website && git pull
else
echo "Cloning new LVEL-website..."
cd ~/SRC && git clone https://gitlab.com/flyingscorpio/LVEL-website.git
cd ~/SRC/LVEL-website && python3 -m venv env
echo "
# Set own environment variables for Django
DJANGO_USER='flyingscorpio'
export DJANGO_USER
DJANGO_PASSWORD='ribosome66'
export DJANGO_PASSWORD
DJANGO_SECRET_KEY='t!d6q&g1*lm-p41m=pd!o&kga9jk)wom)sr7#4-=\$oo*\$)ymtc'
export DJANGO_SECRET_KEY" >> ~/SRC/LVEL-website/env/bin/activate
fi
echo "Setting up MarioSokoban..."
if [ -e ~/SRC/MarioSokoban ]; then
echo "MarioSokoban is already there, updating..."
cd ~/SRC/MarioSokoban && git pull
else
echo "Cloning new MarioSokoban..."
cd ~/SRC && git clone https://gitlab.com/flyingscorpio/MarioSokoban.git
fi
echo "Setting up PythonLocalBlockchain..."
if [ -e ~/SRC/PythonLocalBlockchain ]; then
echo "PythonLocalBlockchain is already there, updating..."
cd ~/SRC/PythonLocalBlockchain && git pull
else
echo "Cloning new PythonLocalBlockchain..."
cd ~/SRC && git clone https://gitlab.com/flyingscorpio/PythonLocalBlockchain.git
fi
echo "Setting up Roboc-GUI..."
if [ -e ~/SRC/Roboc-GUI ]; then
echo "Roboc-GUI is already there, updating..."
cd ~/SRC/Roboc-GUI && git pull
else
echo "Cloning new Roboc-GUI..."
cd ~/SRC && git clone https://gitlab.com/flyingscorpio/Roboc-GUI.git
fi
echo "Setting up Roboc-console..."
if [ -e ~/SRC/Roboc-console ]; then
echo "Roboc-console is already there, updating..."
cd ~/SRC/Roboc-console && git pull
else
echo "Cloning new Roboc-console..."
cd ~/SRC && git clone https://gitlab.com/flyingscorpio/Roboc-console
fi
echo "Setting up SudokuSolver..."
if [ -e ~/SRC/SudokuSolver ]; then
echo "SudokuSolver is already there, updating..."
cd ~/SRC/SudokuSolver && git pull
else
echo "Cloning new SudokuSolver..."
cd ~/SRC && git clone https://gitlab.com/flyingscorpio/SudokuSolver.git
fi
echo "Setting up TicTacToe..."
if [ -e ~/SRC/TicTacToe ]; then
echo "TicTacToe is already there, updating..."
cd ~/SRC/TicTacToe && git pull
else
echo "Cloning new TicTacToe..."
cd ~/SRC && git clone https://gitlab.com/flyingscorpio/TicTacToe.git
fi
echo "Setting up WhitespaceInterpreter..."
if [ -e ~/SRC/WhitespaceInterpreter ]; then
echo "WhitespaceInterpreter is already there, updating..."
cd ~/SRC/WhitespaceInterpreter && git pull
else
echo "Cloning new WhitespaceInterpreter..."
cd ~/SRC && git clone https://gitlab.com/flyingscorpio/WhitespaceInterpreter.git
fi
echo "Setting up WikipediaAcronymScraper..."
if [ -e ~/SRC/WikipediaAcronymScraper ]; then
echo "WikipediaAcronymScraper is already there, updating..."
cd ~/SRC/WikipediaAcronymScraper && git pull
else
echo "Cloning new WikipediaAcronymScraper..."
cd ~/SRC && git clone https://gitlab.com/flyingscorpio/WikipediaAcronymScraper.git
fi