better download for distro packagers
Brought to you by:
scrott
I think it might be a good idea to provide a better way
to download scripts for those who package things for a
given distro. Right now, the steps of upgrading a
packaged vim script are as follows:
find numeric source ID for new version
wget/snarf/curl URL with source ID
rename file "download_script.php?src_id=XYZ" to the
real filename (e.g. foo.zip)
package as normal
It might be nice to automate the file naming and source
ID lookup using simple url rewriting:
i.e.
http://www.vim.org/scripts/download/<scriptname>/<version>
produces a download for scriptname-version.vim or whatever.
Just a thought.
There is potential to resolve this and save the site bandwidth with a simple redirect.
Visiting a particular URL could redirect to the latest version of the download. An example for checking the latest version:
Preferably, it would also be able parse a
v:version-style parameter, so that Vim could avoid fetching a version that is incompatible:That would match records only where the stated required version is <= 8.2.
These should result in either a
404response, or a301with aLocationto the usual download URLs:Plugin managers, etc. could thus do
HEADrequests to check for new versions and avoid following the redirect and fetching the archive unless thesrc_iddiffers from a previous check.File names are available in the
Content-Dispositionheader, e.g.attachment; filename=foo.zip.