forked from extern/nix-config
Refactor Makefile
Since all three stow commands depend on the same options, I made the NS_STOW_OPTIONS variable to update all the commands at once.
This commit is contained in:
parent
ea0dbdae40
commit
aa155f19ca
7
Makefile
7
Makefile
@ -10,15 +10,16 @@
|
||||
NS_REPO_PATH := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
NS_REPO_DIR := $(shell basename $(NS_REPO_PATH))
|
||||
NS_PARENT_PATH := $(shell dirname $(NS_REPO_PATH))
|
||||
NS_STOW_OPTIONS := "${NS_REPO_DIR}" --dir="${NS_PARENT_PATH}" --target="${HOME}" --no-folding --verbose=2
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
stow -S "${NS_REPO_DIR}" --dir="${NS_PARENT_PATH}" --target="${HOME}" --no-folding --verbose=2
|
||||
stow -S ${NS_STOW_OPTIONS}
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
stow -D "${NS_REPO_DIR}" --dir="${NS_PARENT_PATH}" --target="${HOME}" --no-folding --verbose=2
|
||||
stow -D ${NS_STOW_OPTIONS}
|
||||
|
||||
.PHONY: prune
|
||||
prune:
|
||||
stow -R "${NS_REPO_DIR}" --dir="${NS_PARENT_PATH}" --target="${HOME}" --no-folding --verbose=2
|
||||
stow -R ${NS_STOW_OPTIONS}
|
||||
|
Loading…
Reference in New Issue
Block a user