summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej enczykowski <maze@google.com>2019-03-24 18:27:30 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-03-24 18:27:30 -0700
commit33e305cf72f4cd9c4dacb8654f1dc6289ebe456b (patch)
tree814224cc05b281a89fe76f8698287889330e9ef6
parent2d0543ec56f15564b3af68390bca1e353451e997 (diff)
parent2e804885d5502beab537901bfc2b2aeb062840b4 (diff)
downloadtests-33e305cf72f4cd9c4dacb8654f1dc6289ebe456b.tar.gz
net-test: build_rootfs.sh support for i386 & armhf am: 03aa0a663f am: 14b7fb1d05
am: 2e804885d5 Change-Id: I9d34f2f22b674f450737800f6a330eefa12b54af
-rwxr-xr-xnet/test/build_rootfs.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/net/test/build_rootfs.sh b/net/test/build_rootfs.sh
index 887e746..72e9598 100755
--- a/net/test/build_rootfs.sh
+++ b/net/test/build_rootfs.sh
@@ -20,7 +20,7 @@ set -e
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
usage() {
- echo -n "usage: $0 [-h] [-s wheezy|stretch] [-a amd64|arm64] "
+ echo -n "usage: $0 [-h] [-s wheezy|stretch] [-a i386|amd64|armhf|arm64] "
echo "[-m http://mirror/debian] [-n net_test.rootfs.`date +%Y%m%d`]"
exit 1
}
@@ -46,11 +46,15 @@ while getopts ":hs:a:m:n:" opt; do
fi
;;
a)
- if [ "$OPTARG" != "amd64" -a "$OPTARG" != "arm64" ]; then
- echo "Invalid arch: $OPTARG" >&2
- usage
- fi
- arch=$OPTARG
+ case "${OPTARG}" in
+ i386|amd64|armhf|arm64)
+ arch="${OPTARG}"
+ ;;
+ *)
+ echo "Invalid arch: ${OPTARG}" >&2
+ usage
+ ;;
+ esac
;;
m)
mirror=$OPTARG