From 74d91708b9444275465fe1ee2c5354a82313e6cf Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 6 Jun 2020 20:54:24 +1200 Subject: Write out remaining `find` calls in Makefile The -R flag for `cp` is standardized, and these methods are easier to read. --- Makefile | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index eec006cf..6142b909 100644 --- a/Makefile +++ b/Makefile @@ -388,8 +388,7 @@ install-bash-completion: install-bash install-bin: $(BINS) install-bin-man mkdir -p -- $(HOME)/.local/bin - find bin -type f -perm -u=x \ - -exec cp -p -- {} $(HOME)/.local/bin \; + cp -p -- $(BINS) $(HOME)/.local/bin install-bin-man: mkdir -p -- $(XDG_DATA_HOME)/man/man1 $(XDG_DATA_HOME)/man/man8 @@ -423,8 +422,7 @@ install-finger: install-games: $(GAMES) install-games-man mkdir -p -- $(HOME)/.local/games - find games -type f -perm -u=x \ - -exec cp -p -- {} $(HOME)/.local/games \; + cp -p -- $(GAMES) $(HOME)/.local/games install-games-man: mkdir -p -- $(XDG_DATA_HOME)/man/man6 @@ -433,13 +431,12 @@ install-games-man: install-git: git/config $(GIT_TEMPLATE_HOOKS) mkdir -p -- $(XDG_CONFIG_HOME)/git cp -p -- git/config $(XDG_CONFIG_HOME)/git/config - find git/template \ - -type d -exec sh -c 'mkdir -p -- \ - $(XDG_CONFIG_HOME)/git/template"$${1#git/template}"' \ - _ {} \; \ - -o ! -name '*.*' -exec sh -c 'cp -p -- "$$1" \ - $(XDG_CONFIG_HOME)/git/template"$${1#git/template}"' \ - _ {} \; + mkdir -- $(XDG_CONFIG_HOME)/git/template + cp -pR -- git/template/description \ + $(XDG_CONFIG_HOME)/git/template/description + mkdir -- $(XDG_CONFIG_HOME)/git/template/hooks + cp -pR -- $(GIT_TEMPLATE_HOOKS) \ + $(XDG_CONFIG_HOME)/git/template/hooks install-gnupg: gnupg/profile.d/gnupg.sh install-sh cp -p -- gnupg/profile.d/* $(HOME)/.profile.d @@ -584,8 +581,7 @@ install-tmux: tmux/tmux.conf install-terminfo install-urxvt: urxvt/ext/select mkdir -p -- $(HOME)/.urxvt/ext - find urxvt/ext -type f ! -name '*.pl' \ - -exec cp -p -- {} $(HOME)/.urxvt/ext \; + cp -- urxvt/ext/select $(HOME)/.urxvt/ext VIM = vim VIMDIR = $(HOME)/.vim -- cgit v1.2.3