Dot-Zsh/Makefile
2025-12-04 09:23:10 +00:00

63 lines
1.5 KiB
Makefile

# Makefile for Dotfiles
# Tells Make that these targets are not actual files
.PHONY: all setup stow clean update docker-test test-ubuntu test-arch storagebox
# Default target (runs when you just type 'make')
all: stow
# Full Setup
setup:
bash ./scripts/setup.sh
bash ./scripts/node.sh
bash ./scripts/go.sh
bash ./scripts/rust.sh
bash ./scripts/python.sh
@echo "Full setup completed."
# Just stow the dotfiles
stow:
stow . --target=$$HOME --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
# Language Setups
node:
bash ./scripts/node.sh
go:
bash ./scripts/go.sh
rust:
bash ./scripts/rust.sh
python:
bash ./scripts/python.sh
# Setup StorageBox
storagebox:
bash ./scripts/storagebox.sh
# 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"