diff --git a/clone_projects.sh b/clone_projects.sh index a81793c..8180c77 100644 --- a/clone_projects.sh +++ b/clone_projects.sh @@ -7,6 +7,15 @@ # REPOS ON LIME2 # ################## +echo "Setting up E2L..." +if [ -e ~/E2L ]; then + echo "${GREEN}E2L is already there, updating...${NC}" + cd ~/E2L && git pull +else + echo "${ORANGE}Cloning new E2L...${NC}" + cd && git clone ssh://flyingscorpio@2px.info.tm/~/repos/E2L.git +fi + echo "Setting up Keepass..." if [ -e ~/Keepass ]; then echo "${GREEN}Keepass is already there, updating...${NC}" @@ -60,7 +69,7 @@ else echo "${ORANGE}Cloning new VimConf...${NC}" cd && git clone ssh://flyingscorpio@2px.info.tm/~/repos/VimConf.git fi -cd ~/VimConf && /bin/bash ~/VimConf/update.sh "$OS" +cd ~/VimConf && /bin/bash ~/VimConf/update.sh -o ################### diff --git a/setup_cockpit.sh b/setup_cockpit.sh index 3dc95c7..98c0732 100755 --- a/setup_cockpit.sh +++ b/setup_cockpit.sh @@ -14,43 +14,45 @@ export ORANGE export NC -############# -# DEFINE OS # -############# +# Define OS {{{ -if [ -z "$1" ]; then - echo "Which OS are you using?" - select OS in 'debian - ubuntu' 'arch - manjaro'; do - case $OS in - 'debian - ubuntu' ) OS='debian'; break;; - 'arch - manjaro' ) OS='arch'; break;; - esac - done -else - if [ "$1" = 'debian' ] || [ "$1" = 'ubuntu' ]; then +OS='none' +os_release=$(cat /etc/os-release*) +case ${os_release,,} in + *debian* ) OS='debian' - elif [ "$1" = 'arch' ] || [ "$1" = 'manjaro' ]; then + echo "You are using Debian" + ;; + *ubuntu* ) + OS='debian' + echo "You are using Ubuntu" + ;; + *arch* ) OS='arch' - else + echo "You are using Arch-Linux" + ;; + *manjaro* ) + OS='arch' + echo "You are using Manjaro" + ;; + * ) echo "${ORANGE}Didn't understand OS argument${NC}" echo "Which OS are you using?" - select OS in 'debian - ubuntu' 'arch - manjaro'; do + select OS in 'Debian / Ubuntu' 'Arch / Manjaro'; do case $OS in - 'debian - ubuntu' ) OS='debian'; break;; - 'arch - manjaro' ) OS='arch'; break;; + 'Debian / Ubuntu' ) OS='debian'; break;; + 'Arch / Manjaro' ) OS='arch'; break;; esac done - fi -fi -echo "Using $OS" + echo "Using $OS" +esac export OS /bin/bash ~/SetupCockpit/separator.sh +# }}} -################### -# Install scripts # -################### +# Install scripts {{{ echo "Installing scripts..." @@ -65,10 +67,9 @@ fi /bin/bash ~/SetupCockpit/separator.sh +# }}} -######################## -# Update .bash_aliases # -######################## +# Update .bash_aliases {{{ echo "Updating .bash_aliases..." if cp ~/SetupCockpit/bash_aliases ~/.bash_aliases; then @@ -79,10 +80,9 @@ fi /bin/bash ~/SetupCockpit/separator.sh +# }}} -################# -# Configure Git # -################# +# Configure Git {{{ echo "Configuring Git..." @@ -95,10 +95,9 @@ git config --global alias.br "branch" /bin/bash ~/SetupCockpit/separator.sh +# }}} -############################################################################## -# Add MIME type for reading .md files in Firefox (need to add extension too) # -############################################################################## +# Add MIME type for reading .md files in Firefox (need to add extension too) {{{ echo "Adding MIME type for .md files in Firefox..." echo "${ORANGE}Remember to install the Firefox extension for it to work${NC}" @@ -116,10 +115,9 @@ fi /bin/bash ~/SetupCockpit/separator.sh +# }}} -################## -# Clone projects # -################## +# Clone projects {{{ echo "Cloning projects..." @@ -127,13 +125,14 @@ echo "Cloning projects..." /bin/bash ~/SetupCockpit/separator.sh +# }}} -####################### -# Configure ProtonVPN # -####################### +# Configure ProtonVPN {{{ echo "Configuring ProtonVPN..." sudo protonvpn init && sudo protonvpn c --cc NL /bin/bash ~/SetupCockpit/separator.sh + +# }}}