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

Side by Side Diff: build_tools/build_repo.sh

Issue 1405283004: Reduce verbosity of build_repo.sh (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | build_tools/download_pkg.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Native Client Authors. All rights reserved. 1 # Copyright 2015 The Native Client Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 set -o errexit 5 set -o errexit
6 set -o nounset 6 set -o nounset
7 7
8 SCRIPT_DIR="$(cd $(dirname $0) && pwd)" 8 SCRIPT_DIR="$(cd $(dirname $0) && pwd)"
9 NACLPORTS_ROOT="$(cd ${SCRIPT_DIR}/.. && pwd)" 9 NACLPORTS_ROOT="$(cd ${SCRIPT_DIR}/.. && pwd)"
10 10
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 RunPkg() { 26 RunPkg() {
27 local pkg_dir=$1 27 local pkg_dir=$1
28 local out_dir=$2 28 local out_dir=$2
29 WriteMetaFile "${pkg_dir}/meta" 29 WriteMetaFile "${pkg_dir}/meta"
30 mkdir -p "${out_dir}" 30 mkdir -p "${out_dir}"
31 local cmd="$PKG repo -m ${pkg_dir}/meta -o ${out_dir} ${pkg_dir}" 31 local cmd="$PKG repo -m ${pkg_dir}/meta -o ${out_dir} ${pkg_dir}"
32 echo $cmd 32 echo $cmd
33 $cmd 33 $cmd
34 cd ${out_dir}
35 } 34 }
36 35
37 BuildRepo() { 36 BuildRepo() {
38 local gs_url="gs://naclports/builds/${SDK_VERSION}/$1/publish" 37 local revision=$1
39 ${SCRIPT_DIR}/download_pkg.py $1 38 local gs_url="gs://naclports/builds/${SDK_VERSION}/${revision}/publish"
40 local REPO_DIR=${NACLPORTS_ROOT}/out/packages/prebuilt/repo 39 ${SCRIPT_DIR}/download_pkg.py ${revision}
41 for pkg_dir in ${NACLPORTS_ROOT}/out/packages/prebuilt/pkg/*/ ; do 40 cd ${NACLPORTS_ROOT}
42 local out_dir=${REPO_DIR}/$(basename ${pkg_dir}) 41 local repo_dir=out/packages/prebuilt/repo
42 for pkg_dir in out/packages/prebuilt/pkg/*/ ; do
43 local out_dir=${repo_dir}/$(basename ${pkg_dir})
43 RunPkg $pkg_dir $out_dir 44 RunPkg $pkg_dir $out_dir
45 echo "Uploading to ${gs_url}/$(basename ${pkg_dir})"
46 cd ${out_dir}
44 gsutil cp -a public-read *.tbz ${gs_url}/$(basename ${pkg_dir}) 47 gsutil cp -a public-read *.tbz ${gs_url}/$(basename ${pkg_dir})
48 cd -
45 done 49 done
46 } 50 }
47 51
48 BuildLocalRepo() { 52 BuildLocalRepo() {
49 local REPO_DIR=${NACLPORTS_ROOT}/out/publish/ 53 cd ${NACLPORTS_ROOT}/out/publish
50 for pkg_dir in ${REPO_DIR}/pkg_*/ ; do 54 for pkg_dir in pkg_* ; do
51 RunPkg $pkg_dir $pkg_dir 55 RunPkg $pkg_dir $pkg_dir
52 done 56 done
53 } 57 }
54 58
55 UsageHelp() { 59 UsageHelp() {
56 echo "./build_repo.sh - Build pkg repository using \ 60 echo "./build_repo.sh - Build pkg repository using \
57 local/remote built packages" 61 local/remote built packages"
58 echo "" 62 echo ""
59 echo "./build_repo.sh [-l] [-r REVISION]" 63 echo "./build_repo.sh [-l] [-r REVISION]"
60 echo "Either provide a revision(-r) for remote built pakcages or \ 64 echo "Either provide a revision(-r) for remote built pakcages or \
(...skipping 30 matching lines...) Expand all
91 95
92 if [[ ! -f ${PKG} ]]; then 96 if [[ ! -f ${PKG} ]]; then
93 TOOLCHAIN=clang-newlib make pkg F=1 V=1 97 TOOLCHAIN=clang-newlib make pkg F=1 V=1
94 fi 98 fi
95 99
96 if [[ ${local} = 1 ]]; then 100 if [[ ${local} = 1 ]]; then
97 BuildLocalRepo 101 BuildLocalRepo
98 else 102 else
99 BuildRepo $revision 103 BuildRepo $revision
100 fi 104 fi
OLDNEW
« no previous file with comments | « no previous file | build_tools/download_pkg.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698