From a33bbcbb041f6535da92b6be64393329d103cea0 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Mon, 4 Nov 2024 11:03:36 +0100 Subject: [PATCH] beesh: Allow caller to add wget options When wget is used (by the default bee_download), add options from the variable BEE_WGET_OPTS to the command line. This allows the user to add an authorization header, when the file is pulled from a private repository, for example SRCURL[0]="https://github.molgen.mpg.de/api/v3/repos/mariux64/linux/tarball/mariux-$KERNELVERSION-$PKGREVISION mariux-$KERNELVERSION-$PKGREVISION.tar.gz" BEE_WGET_OPTS=(--header="Authorization: Bearer $(cat ~/.bee_gh_token)") --- src/beesh.sh.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/beesh.sh.in b/src/beesh.sh.in index 8d3ddf1..b8fadf4 100644 --- a/src/beesh.sh.in +++ b/src/beesh.sh.in @@ -282,6 +282,7 @@ function fetch_one_file() { --output-document="${F}/${file}.tmp" \ --timeout=60 \ --tries=1 \ + "${BEE_WGET_OPTS[@]}" \ "${url}" if [ ! -s "${F}/${file}.tmp" ] ; then print_error "ERROR: ${F}/${file}.tmp is empty, download failed."