summaryrefslogtreecommitdiffstats
path: root/scripts/sed.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/sed.sh')
-rw-r--r--scripts/sed.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/sed.sh b/scripts/sed.sh
new file mode 100644
index 0000000000..99aa640b0f
--- /dev/null
+++ b/scripts/sed.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# Must use gsed on Mac
+if [[ "$OSTYPE" == "darwin"* ]]
+then
+ export SED=`which gsed`
+else
+ export SED=`which sed`
+fi
+
+if [ ! -x "$SED" ]
+then
+ echo "Sed not found, install gsed on Mac or sed on Linux"
+ exit 1
+fi