Makefile
changeset 961 d7b4c9d10b92
parent 960 b4b2d30f6c97
child 962 88a1ce08b362
equal deleted inserted replaced
960:b4b2d30f6c97 961:d7b4c9d10b92
   106 # Install/uninstall targets.
   106 # Install/uninstall targets.
   107 
   107 
   108 .PHONY: install
   108 .PHONY: install
   109 .ONESHELL:
   109 .ONESHELL:
   110 install:
   110 install:
       
   111 	declare -a files
   111 	for item in $(OVERRIDDEN_ITEMS); do
   112 	for item in $(OVERRIDDEN_ITEMS); do
   112 		if [[ -f $$item ]]; then
   113 		if [[ -f $$item ]]; then
   113 			$(INSTALL_DATA) $$item $(HOME)/$$item
   114 			if [[ $$item == */* ]]; then
   114 		fi
   115 				$(INSTALL_DATA) $$item $(HOME)/$$item
   115 		if [[ -d $$item ]]; then
   116 			else
       
   117 				files+=($$item)
       
   118 			fi
       
   119 		elif [[ -d $$item ]]; then
   116 			for file in `find $$item`; do
   120 			for file in `find $$item`; do
   117 				if [[ -d $$file ]]; then
   121 				if [[ -d $$file ]]; then
   118 					mkdir -p $(HOME)/$$file
   122 					mkdir -p $(HOME)/$$file
   119 					continue
   123 					continue
   120 				fi
   124 				fi
   121 				$(INSTALL_DATA) $$file $(HOME)/$$file
   125 				$(INSTALL_DATA) $$file $(HOME)/$$file
   122 			done
   126 			done
   123 		fi
   127 		fi
   124 	done
   128 	done
       
   129 	$(INSTALL_DATA) -t $(HOME) "$${files[@]}"
   125 	chmod 700 ~/.gnupg/
   130 	chmod 700 ~/.gnupg/
   126 	chmod a+x ~/.fvwm/FvwmKbdd.pl ~/.fvwm/xinit
   131 	chmod a+x ~/.fvwm/FvwmKbdd.pl ~/.fvwm/xinit
   127 	command -v fvwm || exit 0
   132 	command -v fvwm || exit 0
   128 	for f in /etc/xdg/menus/*.menu; do
   133 	for f in /etc/xdg/menus/*.menu; do
   129 		[[ -f "$$f" ]] || continue
   134 		[[ -f "$$f" ]] || continue