OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 2 |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
| 7 # Load common constants. This should be the first executable line. |
| 8 # The path to common.sh should be relative to your script's location. |
| 9 . "$(dirname "$0")/common.sh" |
| 10 |
| 11 assert_inside_chroot |
| 12 assert_not_root_user |
| 13 |
| 14 # Flags |
| 15 DEFINE_string architecture armel "The architecture to fetch." a |
| 16 |
| 17 # Parse command line |
| 18 FLAGS "$@" || exit 1 |
| 19 eval set -- "${FLAGS_ARGV}" |
| 20 |
| 21 # Die on error |
| 22 set -e |
| 23 |
| 24 cd "${DEFAULT_BUILD_ROOT}/${FLAGS_architecture}/local_packages" |
| 25 |
| 26 DEB_BUILD_ARCH="$(dpkg-architecture -qDEB_BUILD_ARCH)" |
| 27 |
| 28 DEBS= |
| 29 for SRC; do |
| 30 SRCCACHE="$(apt-cache showsrc "$SRC")" |
| 31 BINS="$(echo "$SRCCACHE" | grep -m1 ^Binary: | cut -d' ' -f2- | sed 's/,//g')" |
| 32 VER="$(echo "$SRCCACHE" | grep -m1 ^Version: | cut -d' ' -f2)" |
| 33 for BIN in $BINS; do |
| 34 BINCACHE="$(apt-cache show "$BIN")" || continue # might be a udeb |
| 35 DEB="$(echo "$BINCACHE" | grep -m1 ^Filename: | cut -d' ' -f2 | sed "s/_${DE
B_BUILD_ARCH}\.deb/_${FLAGS_architecture}.deb/")" |
| 36 wget -N "http://ports.ubuntu.com/ubuntu-ports/${DEB}" |
| 37 DEBS="$DEBS ${DEB##*/}" |
| 38 done |
| 39 cat >"${SRC}_${VER#*:}_${FLAGS_architecture}.changes" <<EOF |
| 40 Version: $VER |
| 41 Fake: yes |
| 42 EOF |
| 43 done |
| 44 |
| 45 if [ "$DEBS" ]; then |
| 46 chromiumos-build --convert -a "${FLAGS_architecture}" $DEBS |
| 47 fi |
OLD | NEW |