[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/master] use BRE instead of ERE to support FreeBSD better



commit a0655ccaef30d56456e41911b74a9bb917fd103c
Author: Ximin Luo <infinity0@xxxxxxxxxxxxxx>
Date:   Thu Feb 13 13:54:19 2014 +0000

    use BRE instead of ERE to support FreeBSD better
---
 mkman.sh                      |    6 +++---
 proxy/modules/nodejs/Makefile |    2 +-
 version.sh                    |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/mkman.sh b/mkman.sh
index 1087e41..107466c 100755
--- a/mkman.sh
+++ b/mkman.sh
@@ -24,13 +24,13 @@ EOF
 
 # Fixes some help2man quirks, see `man man`
 help2man_fixup() {
-	sed -re '
+	sed -e '
 # restricted to usage synopsis section
-/^\.SH SYNOPSIS$/,/^\.SH \w+$/{
+/^\.SH SYNOPSIS$/,/^\.SH [A-Z][A-Z]*$/{
 	# change hypenated parameters to bold, "type exactly as shown"
 	s/\\fI\-/\\fB\-/g;
 	# change ALL-CAPS parameters to italic, "replace with appropriate argument"
-	s/\b([A-Z]+)\b/\\fI\1\\fR/g;
+	s/\b\([A-Z][A-Z]*\)\b/\\fI\1\\fR/g;
 }'
 }
 
diff --git a/proxy/modules/nodejs/Makefile b/proxy/modules/nodejs/Makefile
index 4c93948..a8f7f76 100644
--- a/proxy/modules/nodejs/Makefile
+++ b/proxy/modules/nodejs/Makefile
@@ -2,7 +2,7 @@
 topsrcdir = ../../..
 
 ALL_DST = flashproxy.js flashproxy.1
-VERSION = $(shell sed -nre 's/^\s*"version"\s*:\s*"([^"]+)".*/\1/gp' package.json)
+VERSION = $(shell sed -ne 's/^[[:space:]]*"version"[[:space:]]*:[[:space:]]*"\([^"][^"]*\)".*/\1/gp' package.json)
 
 all: $(ALL_DST)
 
diff --git a/version.sh b/version.sh
index 87cf555..d69dc64 100755
--- a/version.sh
+++ b/version.sh
@@ -1,3 +1,3 @@
 #!/bin/sh
 # Read version from the ChangeLog to avoid repeating in multiple build scripts
-sed -nre 's/^Changes .* version (.+)$/\1/g;tx;b;:x p;q' ChangeLog
+sed -ne 's/^Changes .* version \(..*\)$/\1/g;tx;b;:x p;q' ChangeLog



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits