RetroDECK/tools/theme-fix.sh

31 lines
1.3 KiB
Bash

#!/bin/bash
zenity \
--icon-name=net.retrodeck.retrodeck \
--question \
--no-wrap \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK" \
--ok-label "Yes" \
--cancel-label "No" \
--text="This tool is will clean some unuseful scraped data in order to beautify the theme.\nDo you want to delete and fix it?"
if [ $? == 0 ] #yes - Internal
then
find ~/retrodeck/.downloaded_media -name miximages -type d -print0|xargs -0 rm -rfv --
find ~/retrodeck/.downloaded_media -name 3dboxes -type d -print0|xargs -0 rm -rfv --
find ~/retrodeck/.downloaded_media -name titlescreens -type d -print0|xargs -0 rm -rfv --
find ~/retrodeck/.downloaded_media -name backcovers -type d -print0|xargs -0 rm -rfv --
find ~/retrodeck/.downloaded_media -namephysicalmedia -type d -print0|xargs -0 rm -rfv --
find ~/retrodeck/.downloaded_media -namescreenshots -type d -print0|xargs -0 rm -rfv --
rm -rf ~/retrodeck/.downloaded_media/thumbnails
ln -s ~/retrodeck/.downloaded_media/covers ~/retrodeck/.downloaded_media/thumbnails
fi
zenity \
--icon-name=net.retrodeck.retrodeck \
--info \
--no-wrap \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK" \
--text="Scraped data is now cleaned and fixed, please restart RetroDECK to reload the games list."