OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 3 # Copyright (c) 2012 The Native Client 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 set -o nounset | 7 set -o nounset |
8 set -o errexit | 8 set -o errexit |
9 | 9 |
10 # The script is located in "native_client/tests/spec2k" | 10 # The script is located in "native_client/tests/spec2k" |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 echo ${SPEC2K_SCRIPT} | 581 echo ${SPEC2K_SCRIPT} |
582 } | 582 } |
583 | 583 |
584 #+ | 584 #+ |
585 #+ CheckFileBuilt <depname> <file> - | 585 #+ CheckFileBuilt <depname> <file> - |
586 #+ | 586 #+ |
587 #+ Check that a dependency is actually built. | 587 #+ Check that a dependency is actually built. |
588 CheckFileBuilt() { | 588 CheckFileBuilt() { |
589 local depname="$1" | 589 local depname="$1" |
590 local filename="$2" | 590 local filename="$2" |
591 if [[ ! -x "${filename}" ]] ; then | 591 if [[ ! -f "${filename}" ]] ; then |
592 echo "You have not built ${depname} yet (${filename})!" 1>&2 | 592 echo "You have not built ${depname} yet (${filename})!" 1>&2 |
593 exit -1 | 593 exit -1 |
594 fi | 594 fi |
595 } | 595 } |
596 | 596 |
597 #+ | 597 #+ |
598 #+ SetupSelLdr <arch> <prefix> <extra_flags> <preload> | 598 #+ SetupSelLdr <arch> <prefix> <extra_flags> <preload> |
599 #+ | 599 #+ |
600 #+ Set up PREFIX to run sel_ldr on <arch>. | 600 #+ Set up PREFIX to run sel_ldr on <arch>. |
601 #+ <prefix> precedes sel_ldr in the command. | 601 #+ <prefix> precedes sel_ldr in the command. |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 | 968 |
969 [ $# = 0 ] && set -- help # Avoid reference to undefined $1. | 969 [ $# = 0 ] && set -- help # Avoid reference to undefined $1. |
970 | 970 |
971 if [ "$(type -t $1)" != "function" ]; then | 971 if [ "$(type -t $1)" != "function" ]; then |
972 Usage | 972 Usage |
973 echo "ERROR: unknown mode '$1'." >&2 | 973 echo "ERROR: unknown mode '$1'." >&2 |
974 exit 1 | 974 exit 1 |
975 fi | 975 fi |
976 | 976 |
977 "$@" | 977 "$@" |
OLD | NEW |