<commit_before>import-module au

$releases = 'http://www.ghisler.com/amazons3.php'

function global:au_SearchReplace {
    @{
        ".\legal\verification.txt" = @{
            "(?i)(setup:.+)\<.*\>"           = "`${1}<$($Latest.URL32)>"
            "(?i)(installer:.+)\<.*\>"       = "`${1}<$($Latest.URL64)>"
            "(?i)(checksum-setup:\s+).*"     = "`${1}$($Latest.Checksum32)"
            "(?i)(checksum-installer:\s+).*" = "`${1}$($Latest.Checksum64)"
        }
     }
}

function global:au_BeforeUpdate {
    Get-RemoteFiles -Purge -NoSuffix
    mv $PSScriptRoot\tools\installer.exe $PSScriptRoot\tools\installer.zip -ea 0
}

function global:au_GetLatest {
    $download_page = Invoke-WebRequest -UseBasicParsing -Uri $releases
    $re = 'x32_64.exe'
    $url = $download_page.links | ? href -match $re | % href
    $download_page.RawContent -match 'Download Total Commander ([0-9][0-9.a]+) ' | Out-Null
    $version = $Matches[1] -replace 'a', '.01'

    # Put combined installer as URL32 and installerzip as URL64 so I can use Get-RemoteFiles to download both later
    @{
        URL32   = $url
        URL64   = "http://ghisler.fileburst.com/addons/installer.zip"
        Version = $version
    }
}

update -ChecksumFor none<commit_msg>(totalcommander) fix bug in file extension of tc setup [AU totalcommander:9.00.01]<commit_after>import-module au

$releases = 'http://www.ghisler.com/amazons3.php'

function global:au_SearchReplace {
    @{
        ".\legal\verification.txt" = @{
            "(?i)(setup:.+)\<.*\>"           = "`${1}<$($Latest.URL32)>"
            "(?i)(installer:.+)\<.*\>"       = "`${1}<$($Latest.URL64)>"
            "(?i)(checksum-setup:\s+).*"     = "`${1}$($Latest.Checksum32)"
            "(?i)(checksum-installer:\s+).*" = "`${1}$($Latest.Checksum64)"
        }
     }
}

function global:au_BeforeUpdate {
    Get-RemoteFiles -Purge -NoSuffix
    mv $PSScriptRoot\tools\installer.exe $PSScriptRoot\tools\installer.zip -ea 0
}

function global:au_GetLatest {
    $download_page = Invoke-WebRequest -UseBasicParsing -Uri $releases
    $re = 'x32_64.exe'
    $url = $download_page.links | ? href -match $re | % href
    $download_page.RawContent -match 'Download Total Commander ([0-9][0-9.a]+) ' | Out-Null
    $version = $Matches[1] -replace 'a', '.01'

    # Put combined installer as URL32 and installerzip as URL64 so I can use Get-RemoteFiles to download both later
    @{
        URL32   = $url
        URL64   = "http://ghisler.fileburst.com/addons/installer.zip"
        Version = $version
        FileType = 'exe'
    }
}

update -ChecksumFor none
{'fraction_non_alphanumeric': 0.18076923076923077, 'fraction_numerical': 0.027307692307692307, 'mean_word_length': 2.7051282051282053, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7640991', 'n_tokens_mistral': 986, 'n_tokens_neox': 910, 'n_words': 169}