Add E2L, modify OS discovery

This commit is contained in:
flyingscorpio@arch-desktop 2020-03-16 11:55:11 +01:00
parent 4f6af200bc
commit 0a27ddf630
2 changed files with 48 additions and 40 deletions

View file

@ -7,6 +7,15 @@
# REPOS ON LIME2 # # 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..." echo "Setting up Keepass..."
if [ -e ~/Keepass ]; then if [ -e ~/Keepass ]; then
echo "${GREEN}Keepass is already there, updating...${NC}" echo "${GREEN}Keepass is already there, updating...${NC}"
@ -60,7 +69,7 @@ else
echo "${ORANGE}Cloning new VimConf...${NC}" echo "${ORANGE}Cloning new VimConf...${NC}"
cd && git clone ssh://flyingscorpio@2px.info.tm/~/repos/VimConf.git cd && git clone ssh://flyingscorpio@2px.info.tm/~/repos/VimConf.git
fi fi
cd ~/VimConf && /bin/bash ~/VimConf/update.sh "$OS" cd ~/VimConf && /bin/bash ~/VimConf/update.sh -o
################### ###################

View file

@ -14,43 +14,45 @@ export ORANGE
export NC export NC
############# # Define OS {{{
# DEFINE OS #
#############
if [ -z "$1" ]; then OS='none'
echo "Which OS are you using?" os_release=$(cat /etc/os-release*)
select OS in 'debian - ubuntu' 'arch - manjaro'; do case ${os_release,,} in
case $OS in *debian* )
'debian - ubuntu' ) OS='debian'; break;;
'arch - manjaro' ) OS='arch'; break;;
esac
done
else
if [ "$1" = 'debian' ] || [ "$1" = 'ubuntu' ]; then
OS='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' 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 "${ORANGE}Didn't understand OS argument${NC}"
echo "Which OS are you using?" 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 case $OS in
'debian - ubuntu' ) OS='debian'; break;; 'Debian / Ubuntu' ) OS='debian'; break;;
'arch - manjaro' ) OS='arch'; break;; 'Arch / Manjaro' ) OS='arch'; break;;
esac esac
done done
fi echo "Using $OS"
fi esac
echo "Using $OS"
export OS export OS
/bin/bash ~/SetupCockpit/separator.sh /bin/bash ~/SetupCockpit/separator.sh
# }}}
################### # Install scripts {{{
# Install scripts #
###################
echo "Installing scripts..." echo "Installing scripts..."
@ -65,10 +67,9 @@ fi
/bin/bash ~/SetupCockpit/separator.sh /bin/bash ~/SetupCockpit/separator.sh
# }}}
######################## # Update .bash_aliases {{{
# Update .bash_aliases #
########################
echo "Updating .bash_aliases..." echo "Updating .bash_aliases..."
if cp ~/SetupCockpit/bash_aliases ~/.bash_aliases; then if cp ~/SetupCockpit/bash_aliases ~/.bash_aliases; then
@ -79,10 +80,9 @@ fi
/bin/bash ~/SetupCockpit/separator.sh /bin/bash ~/SetupCockpit/separator.sh
# }}}
################# # Configure Git {{{
# Configure Git #
#################
echo "Configuring Git..." echo "Configuring Git..."
@ -95,10 +95,9 @@ git config --global alias.br "branch"
/bin/bash ~/SetupCockpit/separator.sh /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 "Adding MIME type for .md files in Firefox..."
echo "${ORANGE}Remember to install the Firefox extension for it to work${NC}" echo "${ORANGE}Remember to install the Firefox extension for it to work${NC}"
@ -116,10 +115,9 @@ fi
/bin/bash ~/SetupCockpit/separator.sh /bin/bash ~/SetupCockpit/separator.sh
# }}}
################## # Clone projects {{{
# Clone projects #
##################
echo "Cloning projects..." echo "Cloning projects..."
@ -127,13 +125,14 @@ echo "Cloning projects..."
/bin/bash ~/SetupCockpit/separator.sh /bin/bash ~/SetupCockpit/separator.sh
# }}}
####################### # Configure ProtonVPN {{{
# Configure ProtonVPN #
#######################
echo "Configuring ProtonVPN..." echo "Configuring ProtonVPN..."
sudo protonvpn init && sudo protonvpn c --cc NL sudo protonvpn init && sudo protonvpn c --cc NL
/bin/bash ~/SetupCockpit/separator.sh /bin/bash ~/SetupCockpit/separator.sh
# }}}