From 888113a69692cc0574a4e6368e0237c33942a8b9 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@pinebook-pro" Date: Tue, 3 Mar 2020 14:18:31 +0100 Subject: [PATCH] Add updatable --- SetupCockpit/clone_projects.sh | 165 +++++++++++++++++++++++++-------- 1 file changed, 128 insertions(+), 37 deletions(-) diff --git a/SetupCockpit/clone_projects.sh b/SetupCockpit/clone_projects.sh index 61f60a4..dd64893 100644 --- a/SetupCockpit/clone_projects.sh +++ b/SetupCockpit/clone_projects.sh @@ -1,6 +1,6 @@ #!/bin/sh -# This script clones all the different repos +## This script clones all the different repos ################## # REPOS ON LIME2 # @@ -10,11 +10,32 @@ cd || exit 1 echo "Currently in $(pwd)" echo "Setting up VimConf..." -git clone ssh://flyingscorpio@2px.info.tm/~/repos/VimConf.git +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..." -git clone ssh://flyingscorpio@2px.info.tm/~/repos/Lessons.git +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..." -git clone ssh://flyingscorpio@2px.info.tm/~/repos/RootMe.git +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 ################### # REPOS ON GITLAB # @@ -25,18 +46,24 @@ if [ ! -e ~/SRC ]; then echo "Created ~/SRC" fi -cd ~/SRC || exit 1 -echo "Currently in $(pwd)" - echo "Setting up e2li/depydoc..." -git clone https://gitlab.com/e2li/depydoc.git +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..." -git clone https://gitlab.com/flyingscorpio/2px.git -cd ~/SRC/2px || exit 1 -echo "Currently in $(pwd)" -python3 -m venv env -echo " +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 @@ -44,23 +71,35 @@ 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 - -echo "Successfully set up 2px" - -cd ~/SRC || exit 1 -echo "Currently in $(pwd)" +fi echo "Setting up BlurMySearches..." -git clone https://gitlab.com/flyingscorpio/BlurMySearches.git +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..." -git clone https://gitlab.com/flyingscorpio/JsonToPython.git +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..." -git clone https://gitlab.com/flyingscorpio/LVEL-website.git -cd ~/SRC/LVEL-website || exit 1 -echo "Currently in $(pwd)" -python3 -m venv env -echo " +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 @@ -68,24 +107,76 @@ 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 -echo "Successfully set up LVEL-website.git" - -cd ~/SRC || exit 1 -echo "Currently in $(pwd)" +fi echo "Setting up MarioSokoban..." -git clone https://gitlab.com/flyingscorpio/MarioSokoban.git +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..." -git clone https://gitlab.com/flyingscorpio/PythonLocalBlockchain.git +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..." -git clone https://gitlab.com/flyingscorpio/Roboc-GUI.git +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..." -git clone https://gitlab.com/flyingscorpio/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..." -git clone https://gitlab.com/flyingscorpio/SudokuSolver.git +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..." -git clone https://gitlab.com/flyingscorpio/TicTacToe.git +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..." -git clone https://gitlab.com/flyingscorpio/WhitespaceInterpreter.git +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..." -git clone https://gitlab.com/flyingscorpio/WikipediaAcronymScraper.git +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