common/bin/compare.sh

changeset 565
39194e004ade
parent 564
befbad2e4d87
child 568
7b9c42f14281
equal deleted inserted replaced
564:befbad2e4d87 565:39194e004ade
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 3 # Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved.
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # 5 #
6 # This code is free software; you can redistribute it and/or modify it 6 # This code is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License version 2 only, as 7 # under the terms of the GNU General Public License version 2 only, as
8 # published by the Free Software Foundation. 8 # published by the Free Software Foundation.
111 -e '/[<>].*public com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*itemsPtr();/d' \ 111 -e '/[<>].*public com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*itemsPtr();/d' \
112 -e '/[<>].*public void setItemsPtr(com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*);/d') 112 -e '/[<>].*public void setItemsPtr(com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*);/d')
113 fi 113 fi
114 fi 114 fi
115 if test "x$SUFFIX" = "xproperties"; then 115 if test "x$SUFFIX" = "xproperties"; then
116 $CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \ 116 # Run through nawk to add possibly missing newline at end of file.
117 | $SED -f "$SRC_ROOT/common/makefiles/support/unicode2x.sed" \ 117 $CAT $OTHER_FILE | $NAWK '{ print }' > $OTHER_FILE.cleaned
118 | $SED -e '/^#/d' -e '/^$/d' \ 118 # Disable this exception since we aren't changing the properties cleaning method yet.
119 -e :a -e '/\\$/N; s/\\\n//; ta' \ 119 # $CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
120 -e 's/^[ \t]*//;s/[ \t]*$//' \ 120 # | $SED -f "$SRC_ROOT/common/makefiles/support/unicode2x.sed" \
121 -e 's/\\=/=/' | LANG=C $SORT > $OTHER_FILE.cleaned 121 # | $SED -e '/^#/d' -e '/^$/d' \
122 # -e :a -e '/\\$/N; s/\\\n//; ta' \
123 # -e 's/^[ \t]*//;s/[ \t]*$//' \
124 # -e 's/\\=/=/' | LANG=C $SORT > $OTHER_FILE.cleaned
122 TMP=$(LANG=C $DIFF $OTHER_FILE.cleaned $THIS_FILE) 125 TMP=$(LANG=C $DIFF $OTHER_FILE.cleaned $THIS_FILE)
123 fi 126 fi
124 if test -n "$TMP"; then 127 if test -n "$TMP"; then
125 echo Files $OTHER_FILE and $THIS_FILE differ 128 echo Files $OTHER_FILE and $THIS_FILE differ
126 return 1 129 return 1

mercurial