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

Side by Side Diff: third_party/grpc/templates/vsprojects/generate_debug_projects.sh

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
(Empty)
1 #!/bin/sh
2
3 # Copyright 2015, Google Inc.
4 # All rights reserved.
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are
8 # met:
9 #
10 # * Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
12 # * Redistributions in binary form must reproduce the above
13 # copyright notice, this list of conditions and the following disclaimer
14 # in the documentation and/or other materials provided with the
15 # distribution.
16 # * Neither the name of Google Inc. nor the names of its
17 # contributors may be used to endorse or promote products derived from
18 # this software without specific prior written permission.
19 #
20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
32 # To properly use this, you'll need to add:
33 #
34 # "debug": true
35 #
36 # to build.json
37
38 cd `dirname $0`/../..
39
40 git add . #because we're using "git diff" to find changes to grpc. sln and then make files based on those changes, this prevents this file or other files from possibly being found in the diff
41
42 ./tools/buildgen/generate_projects-old.sh
43
44 line_number=0
45
46 git diff |
47 grep -A2 \\+Project | #find "Project" immediately after a backslash (escap ed), plus 2 additional lines to capture the "libs = ", plus 1 line of "--". mat ches will come from the generated grpc.sln
48 while read p ; do
49 line_number=$((line_number + 1))
50 if [ "$line_number" -gt "4" ]; then
51 line_number=1;
52 fi
53 echo $line_number
54 echo $p
55 if [ "$line_number" -eq "1" ]; then
56 project_name=$(echo "$p" | cut -d\" -f 4) #sed: extract line N only ; cut with delimiter: ". select only field 4
57 fi
58 if [ "$line_number" -eq "3" ]; then
59 lib_setting=$(echo "$p" | cut -d\" -f 2) #
60 echo "project_name"
61 echo $project_name
62 echo "lib_setting"
63 echo $lib_setting
64 mkdir -p templates/vsprojects/$project_name
65 if [ "$lib_setting" = "True" ]; then
66 echo "lib: true"
67 echo '<%namespace file="../vcxproj_defs.include" import="gen_project"/>${g en_project("'$project_name'", libs)}' > templates/vsprojects/$project_name/$proj ect_name.vcxproj.template
68 else
69 echo "lib: not true"
70 echo '<%namespace file="../vcxproj_defs.include" import="gen_project"/>${g en_project("'$project_name'", targets)}' > templates/vsprojects/$project_name/$p roject_name.vcxproj.template
71 fi
72 fi
73 # sleep .5 #for testing
74 done
75
76 ./tools/buildgen/generate_projects-old.sh
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698