blob: 5df8a2e908d610bf305aa2f12159a62c45273e88 [file] [log] [blame]
Joel Fernandes6c1ca312018-03-30 17:13:15 -07001#!/bin/bash -e
2set -x
3
4script_full_path=$( cd "$(dirname "$0")" ; pwd -P )
5
6source $script_full_path/utils/android
7
8# Set default vars
9DISTRO=buster
10
11# Parse command line parameters
12POSITIONAL=()
13while [[ $# -gt 0 ]]
14do
15key="$1"
16
17case $key in
18 -k|--kernelsrc)
19 KERNEL_PATH="$2"
20 shift || true # past argument
21 shift || true # past value
22 ;;
23 -t|--tempdir)
24 TMPDIR="$2"
25 shift || true # past argument
26 shift || true # past value
27 ;;
28 *) # unknown option
29 POSITIONAL+=("$1") # save it in an array for later
30 shift || true # past argument
31 ;;
32esac
33done
34
35set -- "${POSITIONAL[@]}" # restore positional parameters
36
37# Where do we want to store temporary files
38if [[ -z ${TMPDIR+x} ]] || [[ ! -d "${TMPDIR}" ]]; then
39 TMPDIR=`mktemp`
40fi
41
42