2025-11-05 18:21:30 -05:00
|
|
|
BUILD_COMMIT = $(shell git rev-parse HEAD)
|
|
|
|
|
BASE_IMAGE = registry.fedoraproject.org/fedora-toolbox
|
|
|
|
|
BASE_IMAGE_VERSION = $(shell cat /etc/os-release | grep VERSION_ID | cut -d = -f 2)
|
|
|
|
|
REPOSITORY = localhost/toolbox-dev-env
|
2025-11-07 13:21:29 -05:00
|
|
|
STARSHIP_COLOR = $(shell cat starship.$(HOSTNAME).color)
|
2025-11-05 18:21:30 -05:00
|
|
|
|
2025-11-06 16:46:30 -05:00
|
|
|
.PHONY: container
|
|
|
|
|
container:
|
2025-11-05 18:21:30 -05:00
|
|
|
podman build ./container/ --tag $(REPOSITORY):$(BUILD_COMMIT) --build-arg BASE_IMAGE="$(BASE_IMAGE)" --build-arg BASE_IMAGE_VERSION="$(BASE_IMAGE_VERSION)" --build-arg BUILD_COMMIT="$(BUILD_COMMIT)"
|
|
|
|
|
podman tag $(REPOSITORY):$(BUILD_COMMIT) $(REPOSITORY):latest
|
|
|
|
|
|
2025-11-06 16:46:30 -05:00
|
|
|
.PHONY: container
|
|
|
|
|
scripts:
|
2025-11-06 17:03:11 -05:00
|
|
|
mkdir --parents ~/.local/share/fonts/
|
|
|
|
|
curl -sSLo ~/.local/share/fonts/nerdfont.zip https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/AdwaitaMono.zip
|
|
|
|
|
unzip -o ~/.local/share/fonts/nerdfont.zip -d ~/.local/share/fonts/
|
|
|
|
|
rm ~/.local/share/fonts/nerdfont.zip
|
|
|
|
|
fc-cache -f -v
|
|
|
|
|
|
2025-11-06 16:46:30 -05:00
|
|
|
mkdir --parents ~/.local/bin
|
|
|
|
|
curl -sSo /tmp/starship.sh https://starship.rs/install.sh
|
|
|
|
|
sh /tmp/starship.sh --yes --bin-dir=$(HOME)/.local/bin
|
|
|
|
|
|
2025-11-05 18:21:30 -05:00
|
|
|
mkdir --parents ~/.config/bashrc.d
|
|
|
|
|
cp scripts.d/*.sh ~/.config/bashrc.d/
|
|
|
|
|
|
|
|
|
|
mkdir --parents ~/.config/completions.d
|
|
|
|
|
cp completions.d/*.completion ~/.config/completions.d/
|
|
|
|
|
|
|
|
|
|
cp bashrc.sh ~/.bashrc
|
2025-11-06 16:46:30 -05:00
|
|
|
cp inputrc ~/.inputrc
|
|
|
|
|
cp starship.toml ~/.config/starship.toml
|
2025-11-07 13:23:58 -05:00
|
|
|
sed -i "s/#XXXXXX/$(STARSHIP_COLOR)/g" ~/.config/starship.toml
|
2025-11-06 16:46:30 -05:00
|
|
|
|
|
|
|
|
install: container scripts;
|
2025-11-07 13:21:29 -05:00
|
|
|
|