]> Sergey Matveev's repositories - nnn.git/commitdiff
define SED only if not already defined
authorOmar Polo <op@omarpolo.com>
Wed, 24 Nov 2021 10:44:50 +0000 (11:44 +0100)
committerOmar Polo <op@omarpolo.com>
Wed, 24 Nov 2021 10:44:50 +0000 (11:44 +0100)
This allows packagers to set a custom path for sed (gsed may be simply
called `gsed' or `gnu-sed' or ...)

src/nnn.c

index 20a6051ec7f08c6d668b4612aa7f30b31da788aa..1c12e1cdb17f13c129a7ba5fd64dc71bbcfe1964 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
 #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