forked from extern/nix-config
Add new make prune command
This allows us to prune old symlinks through make.
This commit is contained in:
parent
4f280b0780
commit
ea0dbdae40
5
Makefile
5
Makefile
@ -5,6 +5,7 @@
|
|||||||
# make Defaults to `make install`
|
# make Defaults to `make install`
|
||||||
# make install Installs dotfiles
|
# make install Installs dotfiles
|
||||||
# make uninstall Uninstalls dotfiles
|
# make uninstall Uninstalls dotfiles
|
||||||
|
# make prune Removes stale links
|
||||||
|
|
||||||
NS_REPO_PATH := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
NS_REPO_PATH := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||||
NS_REPO_DIR := $(shell basename $(NS_REPO_PATH))
|
NS_REPO_DIR := $(shell basename $(NS_REPO_PATH))
|
||||||
@ -17,3 +18,7 @@ install:
|
|||||||
.PHONY: uninstall
|
.PHONY: uninstall
|
||||||
uninstall:
|
uninstall:
|
||||||
stow -D "${NS_REPO_DIR}" --dir="${NS_PARENT_PATH}" --target="${HOME}" --no-folding --verbose=2
|
stow -D "${NS_REPO_DIR}" --dir="${NS_PARENT_PATH}" --target="${HOME}" --no-folding --verbose=2
|
||||||
|
|
||||||
|
.PHONY: prune
|
||||||
|
prune:
|
||||||
|
stow -R "${NS_REPO_DIR}" --dir="${NS_PARENT_PATH}" --target="${HOME}" --no-folding --verbose=2
|
||||||
|
Loading…
Reference in New Issue
Block a user