RetroDECK/tools/cheevos.sh.disabled

19 lines
738 B
Plaintext
Raw Normal View History

2022-09-03 15:51:02 +00:00
#!/bin/bash
racfg="/var/config/retroarch/retroarch.cfg"
2022-09-03 15:51:02 +00:00
login=$(zenity --forms --title="RetroAchievements Login" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--text="Enter your RetroAchievements Account details.\n\nBe aware that this tool cannot verify your login details.\nFor registration and more info visit\nhttps://retroachievements.org/\n" \
--separator="=SEP=" \
--add-entry="Username" \
--add-password="Password")
arrIN=(${login//=SEP=/ })
user=${arrIN[0]}
pass=${arrIN[1]}
2022-09-21 14:22:00 +00:00
sed -i "s%cheevos_enable =.*%cheevos_enable = \"true\"%" $racfg
sed -i "s%cheevos_username =.*%cheevos_username = \"$user\"%" $racfg
sed -i "s%cheevos_password =.*%cheevos_password = \"$pass\"%" $racfg