download-updates.bash: Download updates for Microsoft Windows and Office

NOTE
    The branch WSUS Offline Update 11.9.x ESR was created to support
    Windows Server 2008 and Windows 7 / Server 2008 R2.

    Use WSUS Offline Update 12.0 or later for all other updates.

USAGE
   ./download-updates.bash UPDATE[,UPDATE...] LANGUAGE[,LANGUAGE...] \
   [OPTIONS]

UPDATE
    w60           Windows Server 2008, 32-bit
    w60-x64       Windows Server 2008, 64-bit
    w61           Windows 7, 32-bit
    w61-x64       Windows 7 / Server 2008 R2, 64-bit
    w62-x64       Windows Server 2012, 64-bit              (deprecated)
    w63           Windows 8.1, 32-bit                      (deprecated)
    w63-x64       Windows 8.1 / Server 2012 R2, 64-bit     (deprecated)
    w100          Windows 10, 32-bit                       (deprecated)
    w100-x64      Windows 10 / Server 2016/2019, 64-bit    (deprecated)
    o2k13         Office 2013, 32-bit                      (deprecated)
    o2k13-x64     Office 2013, 32-bit and 64-bit           (deprecated)
    o2k16         Office 2016, 32-bit                      (deprecated)
    o2k16-x64     Office 2016, 32-bit and 64-bit           (deprecated)
    all           All Windows and Office updt., 32/64-bit  (deprecated)
    all-x86       All Windows and Office updates, 32-bit   (deprecated)
    all-x64       All Windows and Office updates, 64-bit   (deprecated)
    all-win       All Windows updates, 32-bit and 64-bit   (deprecated)
    all-win-x86   All Windows updates, 32-bit              (deprecated)
    all-win-x64   All Windows updates, 64-bit              (deprecated)
    all-ofc       All Office updates, 32-bit and 64-bit    (deprecated)
    all-ofc-x86   All Office updates, 32-bit               (deprecated)

    Notes: Multiple updates can be joined to a comma-separated list like
    "w63,w63-x64".

LANGUAGE
    deu    German
    enu    English
    ara    Arabic
    chs    Chinese (Simplified)
    cht    Chinese (Traditional)
    csy    Czech
    dan    Danish
    nld    Dutch
    fin    Finnish
    fra    French
    ell    Greek
    heb    Hebrew
    hun    Hungarian
    ita    Italian
    jpn    Japanese
    kor    Korean
    nor    Norwegian
    plk    Polish
    ptg    Portuguese
    ptb    Portuguese (Brazil)
    rus    Russian
    esn    Spanish
    sve    Swedish
    trk    Turkish

    Note: Multiple languages can be joined to a comma-separated list like
    "deu,enu".

OPTIONS
   -includesp
        Include Service Packs

   -includecpp
        Include Visual C++ runtime libraries

   -includedotnet
        Include .NET Frameworks: localized installation files and updates

   -includewddefs
        Windows Defender definition updates for the built-in Defender
        of Windows Vista and 7

   -includemsse
        Microsoft Security Essentials: localized installation files and
        virus definition updates. Microsoft Security Essentials is an
        optional installation for Windows Vista and 7.

   -includewddefs8
        Windows Defender definition updates for the built-in Defender
        of Windows 8, 8.1 and 10

        These are the same virus definition updates as for Microsoft
        Security Essentials, and they are downloaded to the same
        directories, but without the localized installers.

        Therefore, "wddefs8" is a subset of "msse", and you should use
        -includemsse instead for the internal lists "all" and "all-win".

COMPATIBILITY
  - The option -includesp can be used with all updates.

  - The options -includecpp and -includedotnet can be used with all
    Windows updates.

  - The options -includewddefs and -includemsse can be used with Windows
    7, Windows Server 2008 and 2008 R2 (w60, w60-x64, w61, w61-x64). These
    options are also used with the internal lists "all" and "all-win".

  - The option -includewddefs8 can be used with Windows 8.1 and 10,
    Windows Server 2012, 2012 R2 and 2016 (w62-x64, w63, w63-x64, w100,
    w100-x64). Use -includemsse instead for the internal lists "all"
    and "all-win".

NOTES
    Windows Vista and higher are multilingual, but WSUS Offline Update
    still needs the correct language settings to download:
    - localized installers for Internet Explorer on Windows 7, Windows
      Server 2008 and 2008 R2
    - language packs for .NET Frameworks, for languages other than English
    - localized installers for Microsoft Security Essentials

    In the Linux download scripts, all needed languages must be given on
    the command-line. For convenience, you can join several languages
    to a comma-separated list, to allow a faster evaluation of Windows
    7, Windows Server 2008 and 2008 R2, .NET Frameworks, and Microsoft
    Security Essentials.

EXAMPLES
    To get updates for Windows 7 with all optional downloads in German
    and English, you could either use:

    ./download-updates.bash w61 deu -includesp -includecpp \
                -includedotnet -includewddefs -includemsse
    ./download-updates.bash w61 enu -includesp -includecpp \
                -includedotnet -includewddefs -includemsse

    or:

    ./download-updates.bash w61 deu,enu -includesp -includecpp \
                -includedotnet -includewddefs -includemsse

    This should get the same updates as the Windows script
    DownloadUpdates.cmd in its default configuration, using the default
    languages German and English.

    To get updates for Windows 8.1 with all optional downloads in French
    and Spanish, you could use:

    ./download-updates.bash w63 fra,esn -includesp -includecpp \
                                        -includedotnet -includewddefs8

    To get the same results with the Windows script DownloadUpdates.cmd,
    you need to run four additional scripts first:

    RemoveGermanLanguageSupport.cmd
    RemoveEnglishLanguageSupport.cmd
    AddCustomLanguageSupport.cmd fra
    AddCustomLanguageSupport.cmd esn

    Once you removed the default languages in the Windows
    scripts, you cannot easily get them back: There are no scripts
    AddGermanLanguageSupport.cmd or AddEnglishLanguageSupport.cmd. The
    script AddCustomLanguageSupport.cmd won't help either, because German
    and English are not considered "custom" languages. The only way to
    get the defaults back, is to reinstall the wsusoffline archive. With
    the Linux download scripts, you can just specify the default languages
    deu,enu on the command-line again.

    Since version 1.1 of the Linux download scripts, updates can also
    be joined to a comma-separated list. To get all updates for Windows
    7 and Windows 8.1, you can use:

    ./download-updates.bash w61,w61-x64,w63,w63-x64 deu,enu -includesp \
                -includecpp -includedotnet -includewddefs -includemsse

    Note, that wddefs8 is a subset of msse, so you don't need to include
    both for such lists.

    Single updates like w61 and w61-x64 can also be combined with the
    internal lists. To get Windows 7 updates and all Office updates,
    you could use:

    ./download-updates.bash w61,w61-x64,all-ofc deu,enu -includesp \
                -includecpp -includedotnet -includewddefs -includemsse

    See the script get-all-updates.bash for more examples. This script
    may also serve as a template for customization.
