-
Notifications
You must be signed in to change notification settings - Fork 15
/
install-test.fish
executable file
·30 lines (30 loc) · 1002 Bytes
/
install-test.fish
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
#!/usr/bin/fish
set coremod ears-forge-1.4 ears-forge-1.5
set agent ears-nfc ears-nsss ears-bta ears-b1.7.3 ears-forge-1.2
set compat ears-fabric-1.16=ears-fabric-1.15 ears-fabric-1.17=ears-fabric-1.18 ears-forge-1.9=ears-forge-1.10,ears-forge-1.11 ears-bta=ears-b1.7.3
set hasCompat (echo $compat |tr ' ' '\n' |cut -d'=' -f1)
function doCopy
set src $argv[1]
set dst $argv[2]
if contains $dst $agent
rm -f ~/MultiMC/instances/$dst/.minecraft/ears.jar
cp artifacts/$src*.jar ~/MultiMC/instances/$dst/.minecraft/ears.jar
else
set dir mods
if contains $dst $coremod
set dir coremods
end
mkdir -p ~/MultiMC/instances/$dst/.minecraft/$dir/
rm -f ~/MultiMC/instances/$dst/.minecraft/$dir/ears-*.jar
cp artifacts/$src*.jar ~/MultiMC/instances/$dst/.minecraft/$dir
end
end
for t in ears-(ls -1d platform-* |cut -d- -f2-)
if contains $t $hasCompat
for sub in (string split ',' (string split '=' (string match -ea $t= $compat)))
doCopy $t $sub
end
else
doCopy $t $t
end
end