-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (27 loc) · 797 Bytes
/
Copy pathMakefile
File metadata and controls
32 lines (27 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# for convenient dotfiles install
OS := $(shell uname)
STOW := $(shell command -v stow 2> /dev/null)
ifndef STOW
ifeq ($(OS), Darwin)
$(error stow is not available, please install with `brew install stow`)
else
$(error stow is not available, please install with `sudo apt-get install stow`)
endif
endif
#STOW-exists:;@command -v stow > /dev/null
#check: STOW-exists
#linux: check
# @echo stow exists
#.PHONY: check STOW-exists linux
link:
stow --verbose=0 --dir=link --target=$(HOME) --restow common
.PHONY: link
copy:
ifeq ($(OS), Darwin)
echo Copy not available on MacOS yet
else
cp --recursive --backup=numbered --update copy/{.[^.],}* $(HOME)
# TODO gives "find: `copy/*': No such file or directory" if no regular file in copy
# but otherwise works.
endif
.PHONY: copy