]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
scripts: fix sed expression on non-GNU systems
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 10 Nov 2016 10:37:48 +0000 (11:37 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 10 Nov 2016 10:37:48 +0000 (11:37 +0100)
\t escape is a non-standard escape sequence. Thanks Marek for reporting!
http://unix.stackexchange.com/a/145385/41413

scripts/embed-lua.sh

index 403dfa2d070f968371492a8b0bfeca5e88233a10..80f6cba263fb6fffe1f00dfa648539d28a86d783 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
-# clean unnecessary stuff from the lua file
-alias strip="sed -e 's/^[\t ]*//g; s/  */ /g; /^--/d; /^$/d'"
+# Clean unnecessary stuff from the lua file; note the significant tabulator.
+alias strip="sed -e 's/^[       ]*//g; s/  */ /g; /^--/d; /^$/d'"
 if command -v xxd > /dev/null 2>&1; then
        strip < "$1" | xxd -i -
 else