Skip to content

Instantly share code, notes, and snippets.

@fabio777s
Created June 21, 2025 17:19
Show Gist options
  • Save fabio777s/39557f1b8ac7b0dbe5d6f91eb5ca2798 to your computer and use it in GitHub Desktop.
Save fabio777s/39557f1b8ac7b0dbe5d6f91eb5ca2798 to your computer and use it in GitHub Desktop.
lol activate metal
#!/bin/bash
# league-metal-external.sh
# Habilita Metal API para LoL, buscando primero en disco externo.
set -e
ENABLE_METAL_API_KEY="MetalBetaTest"
if [[ $(uname) != "Darwin" ]]; then
echo "Este script debe ejecutarse en macOS."
exit 1
fi
if [[ -d "/Volumes/WD-2TB/Games/League of Legends.app" ]]; then
LOL_PATH="/Volumes/WD-2TB/Games/League of Legends.app"
elif [[ -d "/Applications/League of Legends.app" ]]; then
LOL_PATH="/Applications/League of Legends.app"
elif [[ -d "$HOME/Applications/League of Legends.app" ]]; then
LOL_PATH="$HOME/Applications/League of Legends.app"
else
echo "No se encontró League of Legends."
read -p "Ingresa la ruta completa a League of Legends.app: " LOL_PATH
if [[ ! -d "$LOL_PATH" ]]; then
echo "Ruta inválida: $LOL_PATH"
exit 1
fi
fi
if pgrep "League of Legends" > /dev/null; then
echo "League of Legends está corriendo. Ciérralo y vuelve a intentar."
exit 1
fi
GAME_CFG_PATH="$LOL_PATH/Contents/LoL/Config/game.cfg"
if [[ ! -f "$GAME_CFG_PATH" ]]; then
echo "game.cfg no existe, se creará..."
mkdir -p "$(dirname "$GAME_CFG_PATH")"
printf "[General]\r\n" > "$GAME_CFG_PATH"
fi
if grep -q "$ENABLE_METAL_API_KEY=1" "$GAME_CFG_PATH"; then
echo "Metal API ya está habilitado."
exit 0
fi
echo "Habilitando Metal API..."
sed -i '' "/$ENABLE_METAL_API_KEY/d" "$GAME_CFG_PATH"
sed -i '' "/\[General\]/a\\
$ENABLE_METAL_API_KEY=1"$'\r\n' "$GAME_CFG_PATH"
echo "¡Listo! Metal API activado para League of Legends."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy