mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-08 17:14:28 +01:00
Updated the scripts
This commit is contained in:
parent
a9d32e160c
commit
8a0489ff5f
@ -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
|
||||
}
|
||||
|
@ -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(",")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user