1
0
forked from extern/nix-config

Add new make prune command

This allows us to prune old symlinks through make.
This commit is contained in:
Donovan Glover 2018-10-15 20:26:44 -04:00
parent 4f280b0780
commit ea0dbdae40
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -5,6 +5,7 @@
# make Defaults to `make install`
# make install Installs dotfiles
# make uninstall Uninstalls dotfiles
# make prune Removes stale links
NS_REPO_PATH := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
NS_REPO_DIR := $(shell basename $(NS_REPO_PATH))
@ -17,3 +18,7 @@ install:
.PHONY: uninstall
uninstall:
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