Files
toolbox-dev-env/Makefile

28 lines
1002 B
Makefile
Raw Normal View History

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
.PHONY: container
container:
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
.PHONY: container
scripts:
mkdir --parents ~/.local/bin
curl -sSo /tmp/starship.sh https://starship.rs/install.sh
sh /tmp/starship.sh --yes --bin-dir=$(HOME)/.local/bin
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
cp inputrc ~/.inputrc
cp starship.toml ~/.config/starship.toml
install: container scripts;