Fix: there is no guaranty /etc/mc/mc.ext is in the system.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sat, 18 Sep 2021 23:34:05 +0300
changeset 995 62df95ab609e
parent 994 247f27cfcf68
child 996 17158fb949a8
Fix: there is no guaranty /etc/mc/mc.ext is in the system.
Makefile
--- a/Makefile	Sat Sep 18 23:32:53 2021 +0300
+++ b/Makefile	Sat Sep 18 23:34:05 2021 +0300
@@ -149,7 +149,9 @@
 	mkdir -p $(HOME)/.config/mc $(HOME)/.local/share/mc/
 	umask 0117
 	ln -s -f $(HOME)/.bashrc $(HOME)/.local/share/mc/bashrc
-	cat .config/mc/mc.ext /etc/mc/mc.ext > $(HOME)/.config/mc/mc.ext
+	[[ -f /etc/mc/mc.ext ]] \
+		&& cat .config/mc/mc.ext /etc/mc/mc.ext > $(HOME)/.config/mc/mc.ext \
+		|| $(INSTALL_DATA) .config/mc/mc.ext $(HOME)/.config/mc/mc.ext
 ifneq '' '$(filter $(host_os),cygwin linux)'
 	if command -v file 1>/dev/null; then
 		$(INSTALL_DATA) -t $(HOME) .magic