mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-15 04:44:03 +01:00
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 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
|
||||
|
Loading…
Reference in New Issue
Block a user