Modified script to not use PS 3.0 constructs

Change-Id: I0a4a738a410f0aece9459852a51d6c96f11aae76
Reviewed-on: https://code.wireshark.org/review/3739
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Graham Bloice 2014-08-19 22:54:08 +01:00 committed by Anders Broman
parent 097401c94e
commit 1c10c7b6ed
1 changed files with 2 additions and 2 deletions

View File

@ -80,9 +80,9 @@ foreach ($src_file in Get-ChildItem $SourceFiles) {
$dst_file += ".txt"
}
$src_modtime = (Get-ItemProperty -Path $src_file).LastWriteTime
$src_modtime = (Get-Item $src_file).LastWriteTime
if (-not (Test-Path $dst_file) -or (Test-Path $dst_file -OlderThan $src_modtime)) {
if (-not (Test-Path $dst_file) -or ((Get-Item $dst_file).LastWriteTime -lt $src_modtime)) {
$contents = Get-Content $src_file
[System.IO.File]::WriteAllLines($dst_file, $contents, $no_bom_encoding)
Write-Host "Textified $src_file to $dst_file"