-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
20 lines (19 loc) · 993 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
working=$(basename "$(pwd)")
if ls build/libs/"$working"* 1> /dev/null 2>&1; then
if ls ~/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/dev/.minecraft/mods/"$working"* 1> /dev/null 2>&1; then
rm ~/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/dev/.minecraft/mods/"$working"*
mv build/libs/"$working"* ~/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/dev/.minecraft/mods/
else
mv build/libs/"$working"* ~/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/dev/.minecraft/mods/
fi
flatpak run org.prismlauncher.PrismLauncher -l dev
else
if ls ~/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/dev/.minecraft/mods/"$working"* 1> /dev/null 2>&1; then
echo "$working found, no changes needed."
flatpak run org.prismlauncher.PrismLauncher -l dev
else
echo "$working not found"
exit 1
fi
fi