-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathclone.ps1
More file actions
26 lines (22 loc) · 1.08 KB
/
clone.ps1
File metadata and controls
26 lines (22 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$directory_bp = 'C:\Users\Alecs\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\development_behavior_packs\Sapling BP'
$directory_rp = 'C:\Users\Alecs\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\development_resource_packs\Sapling RP'
$repository_destination = 'C:\Users\Alecs\Desktop\Programming\Addons\Sapling\sources'
if (Test-Path $repository_destination) {
Remove-Item "$repository_destination\*" -Recurse -Force
}
if (Test-Path $directory_bp) {
$new_name_bp = 'Sapling [BP]'
$new_dir_bp = "$repository_destination\$new_name_bp"
if (-not (Test-Path $new_dir_bp)) {
New-Item -Path $new_dir_bp -ItemType Directory
}
Copy-Item -Path "$directory_bp\*" -Destination $new_dir_bp -Recurse
}
if (Test-Path $directory_rp) {
$new_name_rp = 'Sapling [RP]'
$new_dir_rp = "$repository_destination\$new_name_rp"
if (-not (Test-Path $new_dir_rp)) {
New-Item -Path $new_dir_rp -ItemType Directory
}
Copy-Item -Path "$directory_rp\*" -Destination $new_dir_rp -Recurse
}