forked from EaW-Team/equestria_dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrepareForUpload.ps1
More file actions
23 lines (23 loc) · 870 Bytes
/
PrepareForUpload.ps1
File metadata and controls
23 lines (23 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$currentDir = Get-Location
$currentDirName = Get-Location | Get-Item
$destinationName = "equestria"
if($currentDirName.Name -eq "equestria_dev")
{
$destinationName = "..\$destinationName"
}
elseif (Test-Path -Path "$currentDir\equestria_dev")
{
$currentDir = "$currentDir\equestria_dev"
}
else
{
Write-Error "equestria_dev doesn't exist"
exit
}
if (Test-Path -Path $destinationName)
{
Remove-Item -Recurse -Force $destinationName
}
New-Item -ItemType Directory -Force -Path $destinationName
Get-ChildItem -Path $currentDir -Force -Exclude @(".*", "tutorial", "equestria_dev.mod") | Copy-item -Force -Exclude @("popularities_regex.txt", "MTG_notes.txt", "regexes.txt", "*.psd", "*.py", "*.ps1", "*.sh", "*.7z") -Container -Recurse -Verbose -Destination $destinationName
Copy-Item "$destinationName/equestria.mod" -Force -Destination "$destinationName/.."