mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-21 09:28:21 +02:00
Updated the scripts
This commit is contained in:
parent
a9d32e160c
commit
8a0489ff5f
@ -21,7 +21,7 @@ try {
|
|||||||
$URL = $Row.URL
|
$URL = $Row.URL
|
||||||
$Directory = $Row.Directory
|
$Directory = $Row.Directory
|
||||||
write-output ""
|
write-output ""
|
||||||
if (Test-Path($Directory)) {
|
if (Test-Path $Directory) {
|
||||||
write-output "Skipping existing $Directory ..."
|
write-output "Skipping existing $Directory ..."
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -52,13 +52,13 @@ if ($Filename -eq "") {
|
|||||||
}
|
}
|
||||||
write-output "Reading $Filename ..."
|
write-output "Reading $Filename ..."
|
||||||
$file = get-item $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"
|
$zipFile = $file.DirectoryName+"\"+$file.Name+".zip"
|
||||||
$file.CopyTo($zipFile)
|
$file.CopyTo($zipFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
$destination = $file.DirectoryName+"\"+$file.Name.Replace($file.Extension,"")
|
$destination = $file.DirectoryName+"\"+$file.Name.Replace($file.Extension,"")
|
||||||
if (!(Test-Path($destination))) {
|
if (-not(Test-Path $destination)) {
|
||||||
md $destination
|
md $destination
|
||||||
UnzipFile -file $zipFile -dest $destination
|
UnzipFile -file $zipFile -dest $destination
|
||||||
}
|
}
|
||||||
@ -72,7 +72,7 @@ $progress = $null
|
|||||||
|
|
||||||
foreach($item in $content.package.manifest.Item) {
|
foreach($item in $content.package.manifest.Item) {
|
||||||
if ($item."media-type" -eq "application/xhtml+xml") {
|
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 = Get-Content $bookPath"\progress.txt"
|
||||||
$progress = $progress.Split(",")
|
$progress = $progress.Split(",")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user