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

Unified Diff: scripts/update.sh

Issue 1566043002: Prepare for ICU upgrade to 56.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: fix -i again Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/data_files_to_preserve.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/update.sh
diff --git a/scripts/update.sh b/scripts/update.sh
new file mode 100644
index 0000000000000000000000000000000000000000..a41735c13c68caea0d2cb01eed03452c6921328d
--- /dev/null
+++ b/scripts/update.sh
@@ -0,0 +1,54 @@
+#!/bin/bash
+# Copyright (c) 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This is used to prepare for a major version update of ICU (e.g. from
+# 54.1 to 56.1). Running this script is step 1 in README.chromium.
+
+if [ $# -lt 1 ];
+then
+ echo "Usage: $0 version (e.g. '56-1')"
+ exit 1
+fi
+
+version="$1"
+repoprefix="http://source.icu-project.org/repos/icu/icu/tags/release-"
+repo="${repoprefix}${version}"
+treeroot="$(dirname "$0")/.."
+
+# Check if the repo for $version is available.
+svn ls "${repo}" > /dev/null 2>&1 || \
+ { echo "${repo} does not exist."; exit 2; }
+
+echo "Cleaning up source/ ..."
+for file in source license.html readme.html APIChangeReport.html
+do
+ rm -rf "${treeroot}/${file}"
+done
+
+echo "Download ${version} from the upstream repository ..."
+for file in source license.html readme.html APIChangeReport.html
+do
+ svn export --native-eol LF "${repo}/${file}" "${treeroot}/${file}"
+done
+
+echo "deleting directories we don't care about ..."
+for d in layout layoutex data/xml
+do
+ rm -rf "${treeroot}/source/${d}"
+done
+
+echo "restoring local data and configuration files ..."
+while read line
+do
+ # $line is not quoted to expand "*html.ucm".
+ git checkout -- "${treeroot}/source/data/"${line}
+done < "${treeroot}/scripts/data_files_to_preserve.txt"
+
+echo "Patching configure to work without source/layout(ex) directories ..."
+sed -i.orig -e '/^ac_config_files=/ s:\ layout\(ex\)\{0,1\}/Makefile::g' \
+ "${treeroot}/source/configure"
+rm -f "${treeroot}/source/configure.orig"
+
+echo "Done"
« no previous file with comments | « scripts/data_files_to_preserve.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698