mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-04-10 18:48:34 +02:00
Add new Makefile
Although I use stow to manage my dotfiles, the way you need to invoke stow is different depending on where the dotfiles directory is located. To circumvent this, I wrote a Makefile that automatically determines the stow directory (the parent directory) and package directory (this repo) before calling stow.
This commit is contained in:
parent
40b172a459
commit
8c4d136155
@ -8,5 +8,6 @@
|
|||||||
|
|
||||||
README.md
|
README.md
|
||||||
LICENSE
|
LICENSE
|
||||||
|
Makefile
|
||||||
.git/*
|
.git/*
|
||||||
.directory
|
.directory
|
||||||
|
19
Makefile
Normal file
19
Makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
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))
|
||||||
|
|
||||||
|
.PHONY: install
|
||||||
|
install:
|
||||||
|
stow -S "${NS_REPO_DIR}" --dir="${NS_PARENT_PATH}" --target="${HOME}" --no-folding --verbose=2
|
||||||
|
|
||||||
|
.PHONY: uninstall
|
||||||
|
uninstall:
|
||||||
|
stow -D "${NS_REPO_DIR}" --dir="${NS_PARENT_PATH}" --target="${HOME}" --no-folding --verbose=2
|
Loading…
Reference in New Issue
Block a user