Start updating install script
This commit is contained in:
parent
89eacee8c4
commit
24ac06f925
35
install.sh
35
install.sh
@ -1,19 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
function install_dependencies() {
|
||||||
sudo -n apt-get update
|
sudo -n apt-get update
|
||||||
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
fish \
|
fish \
|
||||||
neovim
|
neovim
|
||||||
|
}
|
||||||
|
|
||||||
USER=`whoami`
|
function setup_ssh() {
|
||||||
sudo -n chsh $USER -s $(which fish)
|
mkdir -p ~/.ssh
|
||||||
echo "exec $(which fish) -l" >> ~/.profile
|
touch ~/.ssh/config
|
||||||
echo "exec $(which fish) -l" >> ~/.bashrc
|
chmod 644 ~/.ssh/config
|
||||||
echo "exec $(which fish) -l" >> ~/.zshrc
|
}
|
||||||
|
|
||||||
echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
|
|
||||||
sudo locale-gen
|
|
||||||
|
|
||||||
|
function setup_git() {
|
||||||
cat << EOF > ~/.gitconfig
|
cat << EOF > ~/.gitconfig
|
||||||
[include]
|
[include]
|
||||||
path = ${HOME}/dotfiles/git/gitconfig
|
path = ${HOME}/dotfiles/git/gitconfig
|
||||||
@ -22,7 +22,7 @@ cat << EOF > ~/.gitconfig
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
cat << EOF > ~/.ssh/config
|
cat << EOF >> ~/.ssh/config
|
||||||
Host github.com
|
Host github.com
|
||||||
User git
|
User git
|
||||||
Host gitea
|
Host gitea
|
||||||
@ -30,8 +30,25 @@ Host gitea
|
|||||||
User git
|
User git
|
||||||
EOF
|
EOF
|
||||||
chmod 644 ~/.ssh/config
|
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
|
||||||
|
echo "exec $(which fish) -l" >> ~/.zshrc
|
||||||
|
|
||||||
|
echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
|
||||||
|
sudo locale-gen
|
||||||
|
|
||||||
|
setup_ssh
|
||||||
|
setup_git
|
||||||
|
|
||||||
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