-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit_splitmaker.ps1
More file actions
executable file
·32 lines (24 loc) · 1.07 KB
/
Copy pathinit_splitmaker.ps1
File metadata and controls
executable file
·32 lines (24 loc) · 1.07 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
27
28
29
30
31
32
# 删除并新建 hk-split-maker 目录
Remove-Item -Recurse -Force hk-split-maker -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Path hk-split-maker | Out-Null
Set-Location hk-split-maker
# 初始化 git 仓库并设置远程
git init
git remote add origin git@github.com:slaurent22/hk-split-maker.git
git config core.sparseCheckout true
git sparse-checkout set --no-cone
# 配置稀疏检出规则
Set-Content .git/info/sparse-checkout "src/asset/silksong/categories/*"
Add-Content .git/info/sparse-checkout "src/asset/silksong/icons/*"
# 拉取主分支
git pull --depth=1 origin main
Set-Location ..
# 删除并复制 splitmaker 目录
Remove-Item -Recurse -Force splitmaker -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Path splitmaker | Out-Null
Copy-Item -Force hk-split-maker/src/asset/silksong/categories/*.json splitmaker
git add -A splitmaker
# 删除并复制 splitmaker 目录
Remove-Item -Recurse -Force icons -ErrorAction SilentlyContinue
Copy-Item -Recurse -Force -Path hk-split-maker/src/asset/silksong/icons -Destination icons
git add -A icons