diff options
author | Yann E. MORIN <yann.morin.1998@free.fr> | 2014-07-02 23:11:20 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2014-07-02 23:51:56 +0200 |
commit | daf034f881dbbb15188da16d17aa1c8085b6e9cc (patch) | |
tree | 417276b456ca3d888a75e6d26ac5387fe3a580c5 /support | |
parent | 95a572282e871fdbf5caef2492793ab0fcc61882 (diff) | |
download | buildroot-daf034f881dbbb15188da16d17aa1c8085b6e9cc.tar.gz buildroot-daf034f881dbbb15188da16d17aa1c8085b6e9cc.zip |
pkg-infra: move the svn download helper to a script
Maintaining the download helpers in the Makefile has proved to be a bit
complex, so move it to a shell script.
[Peter: redirect pushd/popd output to /dev/null]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: Ryan Barnett <ryan.barnett@rockwellcollins.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'support')
-rwxr-xr-x | support/download/svn | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/support/download/svn b/support/download/svn new file mode 100755 index 0000000000..142a8d8911 --- /dev/null +++ b/support/download/svn @@ -0,0 +1,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 |