Skip to content

Commit

Permalink
beesh: Allow caller to add wget options
Browse files Browse the repository at this point in the history
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)")
  • Loading branch information
donald committed Nov 4, 2024
1 parent a60176a commit a33bbcb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/beesh.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit a33bbcb

Please sign in to comment.