| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 # | 5 # |
| 6 #@ This script builds the (trusted) sysroot image for ARM. | 6 #@ This script builds the (trusted) sysroot image for ARM. |
| 7 #@ It must be run from the native_client/ directory. | 7 #@ It must be run from the native_client/ directory. |
| 8 #@ Set $DIST to 'trusty' to build trusty rather then precise image. | 8 #@ Set $DIST to 'trusty' to build trusty rather then precise image. |
| 9 #@ | 9 #@ |
| 10 #@ The sysroot consists primarily of ARM headers and libraries. | 10 #@ The sysroot consists primarily of ARM headers and libraries. |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 local package_list="${TMP}/Packages.${DIST}.bz2" | 390 local package_list="${TMP}/Packages.${DIST}.bz2" |
| 391 local package_list2="${TMP}/Packages.${DIST}-security.bz2" | 391 local package_list2="${TMP}/Packages.${DIST}-security.bz2" |
| 392 DownloadOrCopy ${PACKAGE_LIST} ${package_list} | 392 DownloadOrCopy ${PACKAGE_LIST} ${package_list} |
| 393 DownloadOrCopy ${PACKAGE_LIST2} ${package_list2} | 393 DownloadOrCopy ${PACKAGE_LIST2} ${package_list2} |
| 394 bzcat ${package_list} ${package_list2} | egrep '^(Package:|Filename:)' > ${TMP
}/Packages | 394 bzcat ${package_list} ${package_list2} | egrep '^(Package:|Filename:)' > ${TMP
}/Packages |
| 395 | 395 |
| 396 . "${RAW_DEP_LIST}" | 396 . "${RAW_DEP_LIST}" |
| 397 GeneratePackageList ${BASE_DEP_LIST} "${BASE_PACKAGES}" | 397 GeneratePackageList ${BASE_DEP_LIST} "${BASE_PACKAGES}" |
| 398 } | 398 } |
| 399 | 399 |
| 400 help() { |
| 401 Usage |
| 402 } |
| 403 |
| 400 if [[ $# -eq 0 ]] ; then | 404 if [[ $# -eq 0 ]] ; then |
| 401 echo "ERROR: you must specify a mode on the commandline" | 405 echo "ERROR: you must specify a mode on the commandline" |
| 402 echo | 406 echo |
| 403 Usage | 407 Usage |
| 404 exit -1 | 408 exit -1 |
| 405 elif [[ "$(type -t $1)" != "function" ]]; then | 409 elif [[ "$(type -t $1)" != "function" ]]; then |
| 406 echo "ERROR: unknown function '$1'." >&2 | 410 echo "ERROR: unknown function '$1'." >&2 |
| 407 echo "For help, try:" | 411 echo "For help, try:" |
| 408 echo " $0 help" | 412 echo " $0 help" |
| 409 exit 1 | 413 exit 1 |
| 410 else | 414 else |
| 411 ChangeDirectory | 415 ChangeDirectory |
| 412 SanityCheck | 416 SanityCheck |
| 413 "$@" | 417 "$@" |
| 414 fi | 418 fi |
| OLD | NEW |