aboutsummaryrefslogtreecommitdiff
path: root/scripts/portability.sh
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-01-19 16:58:04 -0600
committerRob Landley <rob@landley.net>2019-01-19 16:58:04 -0600
commit84ef9083fbb8435031b0f0ff8ac03324ce2d0e6f (patch)
tree6e166523b5c2508837f3ba63392198418baa77ad /scripts/portability.sh
parent81207825c50fa9a4ec1475024543f830dee247fd (diff)
downloadtoybox-84ef9083fbb8435031b0f0ff8ac03324ce2d0e6f.tar.gz
Factor out scripts/portability.sh and have genconfig.sh use it to find sed/gsed.
Diffstat (limited to 'scripts/portability.sh')
-rw-r--r--scripts/portability.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/portability.sh b/scripts/portability.sh
new file mode 100644
index 00000000..fddd84ec
--- /dev/null
+++ b/scripts/portability.sh
@@ -0,0 +1,6 @@
+# sourced to find alternate names for things
+
+if [ -z "$SED" ]
+then
+ [ ! -z "$(which gsed 2>/dev/null)" ] && SED=gsed || SED=sed
+fi