]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
test: Try to fix sed syntax to fix build error
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 21 Jul 2016 08:19:55 +0000 (10:19 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 21 Jul 2016 08:19:55 +0000 (10:19 +0200)
travis-ci says

    sed: 1: "/^# 1 "<command-line>"$ ...": command a expects \ followed by text

but I fail to reproduce the error locally with GNU sed 4.2.2.

test.sh

diff --git a/test.sh b/test.sh
index 5675bf6e069c51b6b3cc5bb57262180289498b9d..29a0e1acf838e7d20e2e8b3da94ca45d9a493300 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -2628,8 +2628,9 @@ if echo "\$*" | grep -- -D >/dev/null; then
 else
   # mistreat the preprocessor output in the same way as gcc6 does
   $COMPILER "\$@" |
-    sed -e '/^# 1 "<command-line>"$/ a # 31 "<command-line>"' \\
-        -e 's/^# 1 "<command-line>" 2$/# 32 "<command-line>" 2/'
+    sed -e '/^# 1 "<command-line>"\$/ a\\
+# 31 "<command-line>"' \\
+        -e 's/^# 1 "<command-line>" 2\$/# 32 "<command-line>" 2/'
 fi
 exit 0
 EOF