-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
45 lines (37 loc) · 1.21 KB
/
justfile
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
33
34
35
36
37
38
39
40
41
42
43
44
45
alias e := export
alias r := refresh
alias u := update
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
default:
@just --list
[private]
[windows]
_batchcmd cmd loader:
Get-ChildItem -Path versions\{{ loader }} -Directory | % { \
Set-Location $_.FullName; \
Write-Host "running {{ cmd }} in $_"; \
Invoke-Expression "{{ cmd }}"; \
Pop-Location; \
}
[linux]
[macos]
[private]
_batchcmd cmd loader:
for d in versions/{{ loader }}/*/; do \
cd "$d"; \
echo "running {{ cmd }} in $d..."; \
{{ cmd }}; \
cd {{ invocation_directory() }}; \
done
# all versions of <loader> will be exported as a modrinth modpack
[linux]
[macos]
export loader: && (_batchcmd "packwiz modrinth export; mv *.mrpack ../../../.done/" loader)
-mkdir -p .done/{{ loader }}
# all versions of <loader> will be exported as a modrinth modpack
[windows]
export loader: && (_batchcmd "packwiz modrinth export; Move-Item -Path *.mrpack -Destination ../../../.done" loader)
# all versions of <loader> will have pack.toml refreshed
refresh loader: && (_batchcmd "packwiz refresh" loader)
# all versions of <loader> will be updated
update loader: && (_batchcmd "packwiz update --all" loader)