2018-10-15 06:56:56 +02:00
|
|
|
# New Start: A modern Arch workflow built with an emphasis on functionality.
|
|
|
|
# Copyright (C) 2018 Donovan Glover
|
|
|
|
#
|
|
|
|
# Usage:
|
|
|
|
# make Defaults to `make install`
|
|
|
|
# make install Installs dotfiles
|
|
|
|
# make uninstall Uninstalls dotfiles
|
2018-10-16 02:26:44 +02:00
|
|
|
# make prune Removes stale links
|
2018-10-15 06:56:56 +02:00
|
|
|
|
|
|
|
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))
|
2018-10-16 03:34:14 +02:00
|
|
|
NS_STOW_OPTIONS := "${NS_REPO_DIR}" --dir="${NS_PARENT_PATH}" --target="${HOME}" --no-folding --verbose=2
|
2018-10-15 06:56:56 +02:00
|
|
|
|
|
|
|
.PHONY: install
|
|
|
|
install:
|
2018-10-16 03:34:14 +02:00
|
|
|
stow -S ${NS_STOW_OPTIONS}
|
2018-10-15 06:56:56 +02:00
|
|
|
|
|
|
|
.PHONY: uninstall
|
|
|
|
uninstall:
|
2018-10-16 03:34:14 +02:00
|
|
|
stow -D ${NS_STOW_OPTIONS}
|
2018-10-16 02:26:44 +02:00
|
|
|
|
|
|
|
.PHONY: prune
|
|
|
|
prune:
|
2018-10-16 03:34:14 +02:00
|
|
|
stow -R ${NS_STOW_OPTIONS}
|