Skip to content

Instantly share code, notes, and snippets.

@skyisle
Last active March 16, 2017 15:08
Show Gist options
  • Save skyisle/71bd89261fd60daeb9bbbd82069663b5 to your computer and use it in GitHub Desktop.
Save skyisle/71bd89261fd60daeb9bbbd82069663b5 to your computer and use it in GitHub Desktop.
#!/bin/bash
cd /Applications/League\ of\ Legends.app/Contents/LoL/RADS/projects/league_client/releases/
LATESTVERSION=`ls -v | grep -e '\d*\.\d*\.\d*\.\d*' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -n 1`
echo $LATESTVERSION
cd $LATESTVERSION/deploy
if [ "$1" == "kr" ]; then
echo "Update system.yaml to use KR region"
sed -ie 's/rso_platform_id: NA1/rso_platform_id: KR/g' system.yaml
sed -ie 's/\.na2\.lol\.riotgames\.com/.kr.lol.riotgames.com/g' system.yaml
sed -ie 's/plstore2\.na\.lol\.riotgames\.com/plstore.kr.lol.riotgames.com/g' system.yaml
sed -ie 's/web_region: na/web_region: kr/g' system.yaml
elif [ "$1" == "na" ]; then
echo "Update system.yaml to use NA region"
sed -ie 's/rso_platform_id: KR/rso_platform_id: NA1/g' system.yaml
sed -ie 's/\.kr\.lol\.riotgames\.com/.na2.lol.riotgames.com/g' system.yaml
sed -ie 's/plstore\.kr\.lol\.riotgames\.com/plstore2.na2.lol.riotgames.com/g' system.yaml
sed -ie 's/web_region: kr/web_region: na/g' system.yaml
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment