Dot-Zsh/Makefile
2025-12-03 02:34:09 +00:00

41 lines
1.1 KiB
Makefile

# Makefile for Dotfiles
# Tells Make that these targets are not actual files
.PHONY: all setup stow clean update docker-test
# Default target (runs when you just type 'make')
all: stow
# Full Setup
setup:
bash setup.sh
# Just stow the dotfiles
stow:
stow . --target=$$HOME --ignore="setup.sh" --ignore=".git" --ignore=".gitignore" --ignore="README.md" --ignore=".zsh_secrets" --ignore=".zsh_secrets.example" --ignore="LICENSE" --ignore="Makefile"
@echo "Dotfiles linked."
# Clean old files and links
clean:
stow -D . --target=$$HOME
@echo "Links removed."
# Pull Git Updates
update:
git pull origin main
make setup
# Docker Tests
test-ubuntu:
@echo "Ubuntu Test"
docker run -it --rm -e TERM=xterm-256color -v $(PWD):/root/dotfiles ubuntu:latest \
bash -c "export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y sudo git make curl && \
cd /root/dotfiles && \
make setup"
test-arch:
@echo "Spawning Arch Container..."
docker run -it --rm -e TERM=xterm-256color -v $(PWD):/root/dotfiles archlinux:latest \
bash -c "pacman -Sy --noconfirm base-devel git make sudo && cd /root/dotfiles && make setup"