Updated the scripts

This commit is contained in:
Markus Fleschutz 2021-02-22 08:19:03 +01:00
parent a9d32e160c
commit 8a0489ff5f
2 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ try {
$URL = $Row.URL
$Directory = $Row.Directory
write-output ""
if (Test-Path($Directory)) {
if (Test-Path $Directory) {
write-output "Skipping existing $Directory ..."
continue
}

View File

@ -52,13 +52,13 @@ if ($Filename -eq "") {
}
write-output "Reading $Filename ..."
$file = get-item $Filename
if (!(Test-Path($file.DirectoryName+"\"+$file.Name+".zip"))) {
if (-not(Test-Path $file.DirectoryName+"\"+$file.Name+".zip")) {
$zipFile = $file.DirectoryName+"\"+$file.Name+".zip"
$file.CopyTo($zipFile)
}
$destination = $file.DirectoryName+"\"+$file.Name.Replace($file.Extension,"")
if (!(Test-Path($destination))) {
if (-not(Test-Path $destination)) {
md $destination
UnzipFile -file $zipFile -dest $destination
}
@ -72,7 +72,7 @@ $progress = $null
foreach($item in $content.package.manifest.Item) {
if ($item."media-type" -eq "application/xhtml+xml") {
if (Test-Path($bookPath+"\progress.txt")) {
if (Test-Path $bookPath+"\progress.txt") {
$progress = Get-Content $bookPath"\progress.txt"
$progress = $progress.Split(",")
}