Downloading Latest D Language DMD compiler via Windows 10 batch script file.
BoQsc
vaidas.boqsc at gmail.com
Thu Dec 19 08:34:44 UTC 2019
On Wednesday, 18 December 2019 at 18:39:11 UTC, Jacob Carlborg
wrote:
> On 2019-12-17 17:55, BoQsc wrote:
>
>>> :: Get YEARS from from Windows 10 Date Environment Variable
>>> :: Windows 7 might require adjustments to gather the correct
>>> years, as the format might be different
>>> SET "yearsRightNow=%date:~0,4%"
>
> Instead of using the current year, you can use this base URL:
> http://downloads.dlang.org/releases/2.x/
Well, then the script won't download the latest version, it
simply downloads latest version of 2.x version.
You'll never know when 3.x version comes along and will be
released.
The script still need additional lines of code to figure out if
it is 3.x, 4.x, 5.x release yet.
It is only personal preference. For me, checking for date is more
readable, than checking for major version changes.
Although in a perfect world there should be no checks at all,
simply a direct link to latest version. Then we would be left
with only a single line of code of bitsadmin, and that would be
great.
More information about the Digitalmars-d
mailing list