dotfiles/Makefile

53 lines
1.5 KiB
Makefile
Raw Normal View History

2022-07-13 17:01:06 +03:00
pwd = $(shell pwd)
osver=$(shell lsb_release -sr)
oscodename=$(shell lsb_release -sc)
arch=$(shell dpkg --print-architecture)
.PHONY: all
all: /usr/bin/docker /usr/bin/go /usr/bin/nvim dotfiles golibs
# Docker install
.PHONY: /usr/bin/docker
/usr/bin/docker:
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(arch) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(oscodename) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Go install
.PHONY: /usr/bin/go
/usr/bin/go:
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt install golang-go
.PHONY: golibs
golibs: /usr/bin/go
go install github.com/goreleaser/goreleaser@latest
go install github.com/mkchoi212/fac@latest
# Neovim
.PHONY: /usr/bin/nvim
/usr/bin/nvim:
sudo add-apt-repository -r ppa:neovim-ppa/stable
sudo apt install neovim
# dotfiles
.PHONY: dotfiles
2024-02-18 15:18:56 +03:00
dotfiles: ~/.gitconfig ~/.gitignore ~/.config/zsh ~/.config/nvim ~/.zshrc
2022-07-13 17:01:06 +03:00
~/.gitconfig:
@ln -s $(pwd)/git/config ~/.gitconfig || true
~/.gitignore:
@ln -s $(pwd)/git/ignore ~/.gitignore || true
2024-02-18 15:18:56 +03:00
~/.config/nvim:
@ln -s $(pwd)/nvim ~/.config/nvim || true
2022-07-13 17:01:06 +03:00
~/.config/zsh:
@ln -s $(pwd)/zsh ~/.config/zsh || true
~/.zshrc:
2024-02-18 15:18:56 +03:00
@ln -s $(pwd)/zsh/zshrc ~/.zshrc || true