linux-firmware: bump version
[buildroot-gz.git] / support / download / bzr
blob870ce8d079cbbe9739181b4ed6bec8dac8772471
1 #!/usr/bin/env bash
3 # We want to catch any unexpected failure, and exit immediately
4 set -e
6 # Download helper for bzr, to be called from the download wrapper script
8 # Call it as:
9 # .../bzr [-q] OUT_FILE REPO_URL REV BASENAME
11 # Environment:
12 # BZR : the bzr command to call
15 verbose=-v
16 while getopts :q OPT; do
17 case "${OPT}" in
18 q) verbose=-q;;
19 \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;;
20 esac
21 done
22 shift $((OPTIND-1))
24 output="${1}"
25 repo="${2}"
26 rev="${3}"
27 basename="${4}"
29 ${BZR} export ${verbose} --root="${basename}/" --format=tgz "${output}" "${repo}" -r "${rev}"