Skip to content

Commit

Permalink
Merge pull request #9 from diddlesnaps/install-url-parameters
Browse files Browse the repository at this point in the history
Allow query-string parameters in INSTALL_URL and parse it in `install_app`
  • Loading branch information
merlijn-sebrechts authored Jan 25, 2021
2 parents 52db15c + c507db8 commit 4020073
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/sommelier
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ install_app() {

# Download installer if requested.
if [[ -n "${INSTALL_URL:-}" ]]; then
# If we've been given an installer URL derive the filename
INSTALL_EXE="$(basename "${INSTALL_URL//\?*/}")"

wget "${INSTALL_URL}" -O "${TMPDIR}/${INSTALL_EXE}" 2>&1 | \
perl -p -e '$| = 1; s/^.* +([0-9]+%) +([0-9,.]+[GMKB]) +([0-9hms,.]+).*$/\1\n# Downloading... \2 (\3)/' | \
yad --progress --title="Downloading ${INSTALL_EXE}" --width=400 --center --no-buttons --auto-close --auto-kill --on-top --no-escape
Expand Down Expand Up @@ -222,11 +225,6 @@ if [[ -z "${WINEDEBUG:-}" ]]; then
export WINEDEBUG="-all"
fi

# If we've been given and installer URL derive the filename
if [[ -n "${INSTALL_URL:-}" ]]; then
INSTALL_EXE="$(basename "${INSTALL_URL}")"
fi


###########################
# Wine platform selection #
Expand Down

0 comments on commit 4020073

Please sign in to comment.