Skip to content
Snippets Groups Projects
Commit 49723fc6 authored by Kristian Klausen's avatar Kristian Klausen :tada:
Browse files

Support attachments starting with a dot

parent 16dcaaee
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
set -o nounset -o errexit -o pipefail
shopt -s dotglob # Needed for attachments starting with a dot
ALBS_PARALLELIZE_DOWNLOAD="${ALBS_PARALLELIZE_DOWNLOAD:-false}"
ALBS_DOWNLOAD_WAIT="${ALBS_DOWNLOAD_WAIT:-0.05}"
ALBS_RANGE_DOWNLOAD_ENABLED="${ALBS_RANGE_DOWNLOAD_ENABLED:-false}"
......@@ -81,7 +82,8 @@ function download_attachment() {
--user-agent="${user_agent}" \
--no-verbose \
"https://bugs.archlinux.org/?getfile=${2}"
filename="$(compgen -G "*")"
local files=(*)
filename="${files[0]}"
cd ..
mv "tmp/${filename}" .
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment