Reorganize makefile to allow script installation without container
This commit is contained in:
12
Makefile
12
Makefile
@@ -3,11 +3,16 @@ BASE_IMAGE = registry.fedoraproject.org/fedora-toolbox
|
|||||||
BASE_IMAGE_VERSION = $(shell cat /etc/os-release | grep VERSION_ID | cut -d = -f 2)
|
BASE_IMAGE_VERSION = $(shell cat /etc/os-release | grep VERSION_ID | cut -d = -f 2)
|
||||||
REPOSITORY = localhost/toolbox-dev-env
|
REPOSITORY = localhost/toolbox-dev-env
|
||||||
|
|
||||||
build:
|
.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 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
|
podman tag $(REPOSITORY):$(BUILD_COMMIT) $(REPOSITORY):latest
|
||||||
|
|
||||||
install: build
|
.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
|
mkdir --parents ~/.config/bashrc.d
|
||||||
cp scripts.d/*.sh ~/.config/bashrc.d/
|
cp scripts.d/*.sh ~/.config/bashrc.d/
|
||||||
@@ -17,3 +22,6 @@ install: build
|
|||||||
|
|
||||||
cp bashrc.sh ~/.bashrc
|
cp bashrc.sh ~/.bashrc
|
||||||
cp inputrc ~/.inputrc
|
cp inputrc ~/.inputrc
|
||||||
|
cp starship.toml ~/.config/starship.toml
|
||||||
|
|
||||||
|
install: container scripts;
|
||||||
|
|||||||
Reference in New Issue
Block a user