From daf034f881dbbb15188da16d17aa1c8085b6e9cc Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Wed, 2 Jul 2014 23:11:20 +0200 Subject: 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" Reviewed-by: Samuel Martin Reviewed-by: Ryan Barnett Signed-off-by: Peter Korsgaard --- support/download/svn | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 support/download/svn (limited to 'support/download/svn') 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 -- cgit v1.2.3