--- a/Makefile Mon Nov 30 10:49:15 2020 +0200
+++ b/Makefile Fri Jan 08 00:00:03 2021 +0200
@@ -2,7 +2,8 @@
################################################################
# Standard GNU Makefile settings.
-SHELL = /bin/sh -eu
+SHELL = /bin/bash
+.SHELLFLAGS = -xeuc
export PATH := /bin:/usr/bin:${PATH}
# Disable built in pattern rules.
@@ -107,12 +108,12 @@
.PHONY: install
install:
for item in $(OVERRIDDEN_ITEMS); do \
- if [ -f $$item ]; then \
+ if [[ -f $$item ]]; then \
$(INSTALL_DATA) $$item $(HOME)/$$item; \
fi; \
- if [ -d $$item ]; then \
+ if [[ -d $$item ]]; then \
for file in `find $$item`; do \
- if [ -d $$file ]; then \
+ if [[ -d $$file ]]; then \
mkdir -p $(HOME)/$$file; \
continue; \
fi; \
@@ -124,7 +125,7 @@
chmod a+x ~/.fvwm/FvwmKbdd.pl ~/.fvwm/xinit
command -v fvwm || exit 0; \
for f in /etc/xdg/menus/*.menu; do \
- [ -f "$$f" ] || continue; \
+ [[ -f "$$f" ]] || continue; \
fname=$${f%.menu}; \
fname=$${fname##*/}; \
python .fvwm/xdg2fvwm.py Menu-$$fname $$f >~/.fvwm/$$fname.hook; \
@@ -133,16 +134,16 @@
done
mkdir -p ~/.screenshot
for item in $(IFNONEXIST_ITEMS); do \
- if [ -f $$item -a ! -f $(HOME)/$$item ]; then \
+ if [[ -f $$item ]] && ! [[ -f $(HOME)/$$item ]]; then \
$(INSTALL_DATA) $$item $(HOME)/$$item; \
fi; \
- if [ -d $$item ]; then \
+ if [[ -d $$item ]]; then \
for file in `find $$item`; do \
- if [ -d $$file ]; then \
+ if [[ -d $$file ]]; then \
mkdir -p $(HOME)/$$file; \
continue; \
fi; \
- if [ ! -f $(HOME)/$$file ]; then \
+ if [[ ! -f $(HOME)/$$file ]]; then \
$(INSTALL_DATA) $$file $(HOME)/$$file; \
fi; \
done; \