Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1053)

Side by Side Diff: third_party/libvpx/lint_config.sh

Issue 2767143004: libvpx: use bsd-compatible sed expressions (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libvpx/generate_gni.sh ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash -e 1 #!/bin/bash -e
2 # 2 #
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # This script is used to compare vpx_config.h and vpx_config.asm to 7 # This script is used to compare vpx_config.h and vpx_config.asm to
8 # verify the two files match. 8 # verify the two files match.
9 # 9 #
10 # Arguments: 10 # Arguments:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 # Concat header file and assembly file and select those ended with 0 or 1. 50 # Concat header file and assembly file and select those ended with 0 or 1.
51 combined_config="$(cat $header_file $asm_file | grep -E ' +[01] *$')" 51 combined_config="$(cat $header_file $asm_file | grep -E ' +[01] *$')"
52 52
53 # Extra filtering for known exceptions. 53 # Extra filtering for known exceptions.
54 combined_config="$(echo "$combined_config" | grep -v WIDE_REFERENCE)" 54 combined_config="$(echo "$combined_config" | grep -v WIDE_REFERENCE)"
55 combined_config="$(echo "$combined_config" | grep -v ARCHITECTURE)" 55 combined_config="$(echo "$combined_config" | grep -v ARCHITECTURE)"
56 combined_config="$(echo "$combined_config" | grep -v DO1STROUNDING)" 56 combined_config="$(echo "$combined_config" | grep -v DO1STROUNDING)"
57 57
58 # Remove all spaces. 58 # Remove all spaces.
59 combined_config="$(echo "$combined_config" | sed 's/[ \t]//g')" 59 combined_config="$(echo "$combined_config" | sed 's/[[:space:]]//g')"
60 60
61 # Remove #define in the header file. 61 # Remove #define in the header file.
62 combined_config="$(echo "$combined_config" | sed 's/.*define//')" 62 combined_config="$(echo "$combined_config" | sed 's/.*define//')"
63 63
64 # Remove equ in the ASM file. 64 # Remove equ in the ASM file.
65 combined_config="$(echo "$combined_config" | sed 's/\.equ//')" # gas style 65 combined_config="$(echo "$combined_config" | sed 's/\.equ//')" # gas style
66 combined_config="$(echo "$combined_config" | sed 's/equ//')" # rvds style 66 combined_config="$(echo "$combined_config" | sed 's/equ//')" # rvds style
67 combined_config="$(echo "$combined_config" | sed 's/\.set//')" # apple style 67 combined_config="$(echo "$combined_config" | sed 's/\.set//')" # apple style
68 68
69 # Remove %define in YASM ASM files. 69 # Remove %define in YASM ASM files.
70 combined_config="$(echo "$combined_config" | sed 's/%define\s *//')" # yasm styl e 70 combined_config="$(echo "$combined_config" | sed 's/%define[[:space:]]*//')"
71 71
72 # Remove useless comma in gas style assembly file. 72 # Remove useless comma in gas style assembly file.
73 combined_config="$(echo "$combined_config" | sed 's/,//')" 73 combined_config="$(echo "$combined_config" | sed 's/,//')"
74 74
75 # Substitute 0 with =no. 75 # Substitute 0 with =no.
76 combined_config="$(echo "$combined_config" | sed 's/0$/=no/')" 76 combined_config="$(echo "$combined_config" | sed 's/0$/=no/')"
77 77
78 # Substitute 1 with =yes. 78 # Substitute 1 with =yes.
79 combined_config="$(echo "$combined_config" | sed 's/1$/=yes/')" 79 combined_config="$(echo "$combined_config" | sed 's/1$/=yes/')"
80 80
(...skipping 22 matching lines...) Expand all
103 # Do some additional filter to make libvpx happy. 103 # Do some additional filter to make libvpx happy.
104 combined_config="$(echo "$combined_config" | grep -v ARCH_X86=no)" 104 combined_config="$(echo "$combined_config" | grep -v ARCH_X86=no)"
105 combined_config="$(echo "$combined_config" | grep -v ARCH_X86_64=no)" 105 combined_config="$(echo "$combined_config" | grep -v ARCH_X86_64=no)"
106 106
107 # Print out the unique configurations. 107 # Print out the unique configurations.
108 if [ -n "$out_file" ]; then 108 if [ -n "$out_file" ]; then
109 echo "$combined_config" | sort | uniq > $out_file 109 echo "$combined_config" | sort | uniq > $out_file
110 else 110 else
111 echo "$combined_config" | sort | uniq 111 echo "$combined_config" | sort | uniq
112 fi 112 fi
OLDNEW
« no previous file with comments | « third_party/libvpx/generate_gni.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698