37 lines
969 B
Bash
Executable File
37 lines
969 B
Bash
Executable File
|
|
paths=(
|
|
"$HOME/.local/share/PrismLauncher/instances"
|
|
"$HOME/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances"
|
|
)
|
|
|
|
INSTANCE_DIR=""
|
|
|
|
for path in "${paths[@]}"; do
|
|
if [ -d "$path" ] && [ "$(ls -A "$path")" ]; then
|
|
INSTANCE_DIR="$path"
|
|
break
|
|
fi
|
|
done
|
|
|
|
INSTANCE=$(find "$INSTANCE_DIR" -mindepth 1 -maxdepth 1 -type d | fzf --prompt "Select Minecraft Instance: ")
|
|
|
|
if [ -z "$INSTANCE" ]; then
|
|
echo "No instance selected, exiting."
|
|
exit 1
|
|
fi
|
|
|
|
if [ -d "$INSTANCE/.minecraft" ]; then
|
|
RESOURCE_PACKS_DIR="$INSTANCE/.minecraft/resourcepacks"
|
|
elif [ -d "$INSTANCE/minecraft" ]; then
|
|
RESOURCE_PACKS_DIR="$INSTANCE/minecraft/resourcepacks"
|
|
else
|
|
echo "Error: No valid minecraft folder found in '$INSTANCE'?"
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$RESOURCE_PACKS_DIR"
|
|
# ln -sf "$(pwd)/PloofPack.zip" "$RESOURCE_PACKS_DIR/PloofPack.zip"
|
|
cp PloofPack.zip "$RESOURCE_PACKS_DIR/PloofPack.zip"
|
|
|
|
echo "✅ Symlink created for '$INSTANCE'. Texture pack is now linked!"
|