From: Daniel Carl Date: Sat, 12 Oct 2013 20:41:07 +0000 (+0200) Subject: Don't use GNU extension in sed script. X-Git-Url: https://git.owens.tech///git?a=commitdiff_plain;h=5a37f52570310338ffdf94ac17b2c8cc32f33f8f;p=vimb.git Don't use GNU extension in sed script. Simplified the rules to match only comments used in the hints scripts. --- diff --git a/src/js2h.sh b/src/js2h.sh index 95ff77a..0aa6c04 100755 --- a/src/js2h.sh +++ b/src/js2h.sh @@ -2,12 +2,10 @@ echo -n '#define HINTS_JS "' cat $1 | \ - sed -e "s|/\*[^*]*\*\+\([^/][^*]*\*\+\)*/||g" | \ tr '\n\r\t' ' ' | \ - sed -e "s| \+| |g" \ - -e "s|^//.*$||" \ - -e "s| \([-!?<>:=(){};+\&\"',\|]\)|\1|g" \ - -e "s|\([-!?<>:=(){};+\&\"',\|]\) |\1|g" \ + sed -e 's:/\*[^*]*\*/::g' \ + -e 's|[ ]\{2,\}| |g' \ + -e "s|[ ]\{0,\}\([-!?<>:=(){};+\&\"',\|]\)[ ]\{0,\}|\1|g" \ -e 's|\\|\\\\|g' \ -e 's|"|\\"|g' echo '"'