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
|
||||
|
||||
sudo -n apt-get update
|
||||
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
fish \
|
||||
neovim
|
||||
function install_dependencies() {
|
||||
sudo -n apt-get update
|
||||
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
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`
|
||||
|
||||
install_dependencies
|
||||
|
||||
sudo -n chsh $USER -s $(which fish)
|
||||
echo "exec $(which fish) -l" >> ~/.profile
|
||||
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
|
||||
sudo locale-gen
|
||||
|
||||
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
|
||||
setup_ssh
|
||||
setup_git
|
||||
|
||||
mkdir -p ~/.config/
|
||||
ln -s ~/dotfiles/fish ~/.config/fish
|
||||
mkdir -p ~/.config/nvim/
|
||||
ln -s ~/dotfiles/init.vim ~/.config/nvim/init.vim
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user