Refactor Update-Scripts function to create temporary directory in script folder and update .gitignore for new paths
This commit is contained in:
16
.gitignore
vendored
Normal file
16
.gitignore
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# Ignore temporary directory used by update scripts
|
||||||
|
/temp/
|
||||||
|
/windows-install/
|
||||||
|
|
||||||
|
# Other common files to ignore
|
||||||
|
*.zip
|
||||||
|
last_update_check.txt
|
||||||
|
|
||||||
|
# OS generated files
|
||||||
|
.DS_Store
|
||||||
|
.DS_Store?
|
||||||
|
._*
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
ehthumbs.db
|
||||||
|
Thumbs.db
|
||||||
@@ -41,8 +41,8 @@ function Update-Scripts {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create a temporary directory to download files
|
# Create a temporary directory in the script folder (will be ignored by git)
|
||||||
$tempDir = Join-Path -Path $env:TEMP -ChildPath "windows-install-update"
|
$tempDir = Join-Path -Path $updateScriptDir -ChildPath "temp"
|
||||||
if (Test-Path $tempDir) { Remove-Item $tempDir -Recurse -Force }
|
if (Test-Path $tempDir) { Remove-Item $tempDir -Recurse -Force }
|
||||||
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
|
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ function Update-Scripts {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create a temporary directory to download files
|
# Create a temporary directory in the script folder (will be ignored by git)
|
||||||
$tempDir = Join-Path -Path $env:TEMP -ChildPath "windows-install-update"
|
$tempDir = Join-Path -Path $updateScriptDir -ChildPath "temp"
|
||||||
if (Test-Path $tempDir) { Remove-Item $tempDir -Recurse -Force }
|
if (Test-Path $tempDir) { Remove-Item $tempDir -Recurse -Force }
|
||||||
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
|
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ function Update-Scripts {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create a temporary directory to download files
|
# Create a temporary directory in the script folder (will be ignored by git)
|
||||||
$tempDir = Join-Path -Path $env:TEMP -ChildPath "windows-install-update"
|
$tempDir = Join-Path -Path $updateScriptDir -ChildPath "temp"
|
||||||
if (Test-Path $tempDir) { Remove-Item $tempDir -Recurse -Force }
|
if (Test-Path $tempDir) { Remove-Item $tempDir -Recurse -Force }
|
||||||
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
|
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user