OLD | NEW |
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 tool is used to update libvpx source code with the latest git | 7 # This tool is used to update libvpx source code with the latest git |
8 # repository. | 8 # repository. |
9 # | 9 # |
10 # Make sure you run this in a git checkout of deps/third_party/libvpx! | 10 # Make sure you run this in a git checkout of deps/third_party/libvpx! |
11 | 11 |
12 # Usage: | 12 # Usage: |
13 # | 13 # |
14 # $ ./update_libvpx.sh [branch | revision | file or url containing a revision] | 14 # $ ./update_libvpx.sh [branch | revision | file or url containing a revision] |
15 # When specifying a branch it may be necessary to prefix with origin/ | 15 # When specifying a branch it may be necessary to prefix with origin/ |
16 | 16 |
17 # Tools required for running this tool: | 17 # Tools required for running this tool: |
18 # | 18 # |
19 # 1. Linux / Mac | 19 # 1. Linux / Mac |
20 # 2. git | 20 # 2. git |
21 | 21 |
22 export LC_ALL=C | 22 export LC_ALL=C |
23 | 23 |
24 # Location for the remote git repository. | 24 # Location for the remote git repository. |
25 GIT_REPO="http://git.chromium.org/webm/libvpx.git" | 25 GIT_REPO="https://chromium.googlesource.com/webm/libvpx" |
26 | 26 |
27 GIT_BRANCH="origin/master" | 27 GIT_BRANCH="origin/master" |
28 LIBVPX_SRC_DIR="source/libvpx" | 28 LIBVPX_SRC_DIR="source/libvpx" |
29 BASE_DIR=`pwd` | 29 BASE_DIR=`pwd` |
30 | 30 |
31 if [ -n "$1" ]; then | 31 if [ -n "$1" ]; then |
32 GIT_BRANCH="$1" | 32 GIT_BRANCH="$1" |
33 if [ -f "$1" ]; then | 33 if [ -f "$1" ]; then |
34 GIT_BRANCH=$(<"$1") | 34 GIT_BRANCH=$(<"$1") |
35 elif [[ $1 = http* ]]; then | 35 elif [[ $1 = http* ]]; then |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 # Add and remove files. | 113 # Add and remove files. |
114 echo "$add" | xargs -I {} git add {} | 114 echo "$add" | xargs -I {} git add {} |
115 echo "$delete" | xargs -I {} git rm {} | 115 echo "$delete" | xargs -I {} git rm {} |
116 | 116 |
117 # Find empty directories and remove them. | 117 # Find empty directories and remove them. |
118 find . -type d -empty -exec git rm {} \; | 118 find . -type d -empty -exec git rm {} \; |
119 | 119 |
120 chmod 755 build/make/*.sh build/make/*.pl configure | 120 chmod 755 build/make/*.sh build/make/*.pl configure |
121 | 121 |
122 cd $BASE_DIR | 122 cd $BASE_DIR |
OLD | NEW |