From: Omar Polo <op@omarpolo.com>
Date: Wed, 24 Nov 2021 10:44:50 +0000 (+0100)
Subject: define SED only if not already defined
X-Git-Tag: v4.5~55^2
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=fb3d3ab0efd0a1789ee1afc50cbd56f0587fc196;p=nnn.git

define SED only if not already defined

This allows packagers to set a custom path for sed (gsed may be simply
called `gsed' or `gnu-sed' or ...)
---

diff --git a/src/nnn.c b/src/nnn.c
index 20a6051e..1c12e1cd 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -202,12 +202,14 @@
 #define CTX_MAX 8
 #endif
 
+#ifndef SED
 /* BSDs or Solaris or SunOS */
 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(sun) || defined(__sun)
 #define SED "gsed"
 #else
 #define SED "sed"
 #endif
+#endif
 
 /* Large selection threshold */
 #ifndef LARGESEL