summaryrefslogtreecommitdiffstats
path: root/support/download/svn
blob: 142a8d8911608311ec88115ba68e344c896dd727 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

# We want to catch any command failure, and exit immediately
set -e

# Download helper for svn
# Call it with:
#   $1: svn repo
#   $2: svn revision
#   $3: package's basename (eg. foobar-1.2.3)
#   $4: output file
# And this environment:
#   SVN       : the svn command to call
#   BR2_DL_DIR: path to Buildroot's download dir

repo="${1}"
rev="${2}"
basename="${3}"
output="${4}"

pushd "${BR2_DL_DIR}" >/dev/null
${SVN} export "${repo}@${rev}" "${basename}"
tar czf "${output}" "${basename}"
rm -rf "${basename}"
popd >/dev/null
OpenPOWER on IntegriCloud