Start updating install script
This commit is contained in:
parent
89eacee8c4
commit
24ac06f925
57
install.sh
57
install.sh
@ -1,11 +1,41 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
sudo -n apt-get update
|
function install_dependencies() {
|
||||||
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
sudo -n apt-get update
|
||||||
fish \
|
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
neovim
|
fish \
|
||||||
|
neovim
|
||||||
|
}
|
||||||
|
|
||||||
|
function setup_ssh() {
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
touch ~/.ssh/config
|
||||||
|
chmod 644 ~/.ssh/config
|
||||||
|
}
|
||||||
|
|
||||||
|
function setup_git() {
|
||||||
|
cat << EOF > ~/.gitconfig
|
||||||
|
[include]
|
||||||
|
path = ${HOME}/dotfiles/git/gitconfig
|
||||||
|
[core]
|
||||||
|
excludesfile = ${HOME}/dotfiles/git/gitignore_global
|
||||||
|
EOF
|
||||||
|
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
cat << EOF >> ~/.ssh/config
|
||||||
|
Host github.com
|
||||||
|
User git
|
||||||
|
Host gitea
|
||||||
|
HostName git.torpet.thomasloven.com
|
||||||
|
User git
|
||||||
|
EOF
|
||||||
|
chmod 644 ~/.ssh/config
|
||||||
|
}
|
||||||
|
|
||||||
USER=`whoami`
|
USER=`whoami`
|
||||||
|
|
||||||
|
install_dependencies
|
||||||
|
|
||||||
sudo -n chsh $USER -s $(which fish)
|
sudo -n chsh $USER -s $(which fish)
|
||||||
echo "exec $(which fish) -l" >> ~/.profile
|
echo "exec $(which fish) -l" >> ~/.profile
|
||||||
echo "exec $(which fish) -l" >> ~/.bashrc
|
echo "exec $(which fish) -l" >> ~/.bashrc
|
||||||
@ -14,24 +44,11 @@ echo "exec $(which fish) -l" >> ~/.zshrc
|
|||||||
echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
|
echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
|
||||||
sudo locale-gen
|
sudo locale-gen
|
||||||
|
|
||||||
cat << EOF > ~/.gitconfig
|
setup_ssh
|
||||||
[include]
|
setup_git
|
||||||
path = ${HOME}/dotfiles/git/gitconfig
|
|
||||||
[core]
|
|
||||||
excludesfile = ${HOME}/dotfiles/git/gitignore_global
|
|
||||||
EOF
|
|
||||||
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
cat << EOF > ~/.ssh/config
|
|
||||||
Host github.com
|
|
||||||
User git
|
|
||||||
Host gitea
|
|
||||||
HostName git.torpet.thomasloven.com
|
|
||||||
User git
|
|
||||||
EOF
|
|
||||||
chmod 644 ~/.ssh/config
|
|
||||||
|
|
||||||
mkdir -p ~/.config/
|
mkdir -p ~/.config/
|
||||||
ln -s ~/dotfiles/fish ~/.config/fish
|
ln -s ~/dotfiles/fish ~/.config/fish
|
||||||
mkdir -p ~/.config/nvim/
|
mkdir -p ~/.config/nvim/
|
||||||
ln -s ~/dotfiles/init.vim ~/.config/nvim/init.vim
|
ln -s ~/dotfiles/init.vim ~/.config/nvim/init.vim
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user