On Debian based systems where APT tool is available, you can download deb packages without installing them by replacing apt-get install
with apt-get download
in N0rbert's answer. However, since you still want to use wget
and avoid APT, you need to first understand, Vivaldi, doesn't name their latest release like Firefox and Google Chrome do. Firefox and Google Chrome generally makes latest
/current
point to the latest release which Vivaldi don't follow. It just adds the version number in the deb package name.
Since, Vivaldi maintains a file known as Packages which contains information about the builds currently available in the repository for a particular architecture (see How to see all packages in a package repository? Website or command line?). It generally has a stable build and a snapshot. As of now snapshot's information is placed at top. Might confirm later whether the information placement is random or fixed.
A simple bash script would look like this:
#!/bin/bash
wget https://repo.vivaldi.com/archive/deb/dists/stable/main/binary-amd64/Packages
ver=$(tac Packages| grep -m1 Version | cut -d " " -f2)
wget https://repo.vivaldi.com/archive/deb/pool/main/vivaldi-stable_"$ver"_amd64.deb
rm Packages
Some explanation:
First downloaded the Packages file. Extracted the latest version string and stored in ver
variable. Since the stable's information is stored at bottom of the file, tac
was used to reverse the rows. Used grep
to extract the "version". And to limit results -m
flag was used. Since the result is like "Version: VersionNumber", used cut
with -f
flag to get second field, i.e., VersionNumber. Since debs are in /pool, used wget
and value of ver
to get the latest build from there. Finally removed Packages file.
If you're using some other architecture you can use that instead of amd64, for example, i386. I assumed that there was no file with name as Packages already existing in the current working directory. You might like to create a new folder specially for this and delete it later from the script itself. Alternatively, you can use -O
option from wget
.
ERROR 403: Forbidden
when a wildcard is used.wget -r --no-parent -A 'vivaldi-stable_*.deb' https://downloads.vivaldi.com/stable/
There's nothing you can do.
– Archisman Panigrahi Dec 28 '20 at 08:09