mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-27 00:05:37 +00:00
Added roms mover tool
This commit is contained in:
parent
c084f73ee1
commit
6b83f563db
|
@ -5,10 +5,14 @@
|
|||
<name>Start RetroArch</name>
|
||||
<sortname>RetroArch</sortname>
|
||||
<desc>Start RetroArch to manually tweak your settings.</desc>
|
||||
<releasedate>20100525T000000</releasedate>
|
||||
<developer>Libretro</developer>
|
||||
<publisher>Libretro</publisher>
|
||||
<genre>Emulator</genre>
|
||||
<nogamecount>true</nogamecount>
|
||||
<nomultiscrape>true</nomultiscrape>
|
||||
</game>
|
||||
<game>
|
||||
<path>./move-roms.sh</path>
|
||||
<name>Move roms folder</name>
|
||||
<sortname>Move roms folder</sortname>
|
||||
<desc>Move roms folder from internal to external and vice versa.</desc>
|
||||
<nogamecount>true</nogamecount>
|
||||
<nomultiscrape>true</nomultiscrape>
|
||||
</game>
|
||||
|
|
25
tools/move-roms.sh
Normal file
25
tools/move-roms.sh
Normal file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -d ~/retrodeck/roms ] && [ -d ~/retrodeck/roms ]
|
||||
then # found both internal and sd folders
|
||||
kdialog --title "RetroDECK" --warning "I found a roms folder both in internal and SD Card, in order to make this tool useful you should remove one of the two."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -d ~/retrodeck/roms ] && [ ! -d /run/media/mmcblk0p1/retrodeck/roms ]
|
||||
then # found internal folder and not the external
|
||||
roms_path=~/retrodeck
|
||||
new_roms_path=/run/media/mmcblk0p1/retrodeck
|
||||
fi
|
||||
|
||||
if [ ! -d ~/retrodeck/roms ] && [ -d /run/media/mmcblk0p1/retrodeck/roms ]
|
||||
then # found external folder and not the internal
|
||||
roms_path=/run/media/mmcblk0p1/retrodeck
|
||||
new_roms_path=~/retrodeck
|
||||
fi
|
||||
|
||||
mkdir -p $new_roms_path
|
||||
mv -f $roms_path/roms $new_roms_path/roms
|
||||
rm -f /var/config/emulationstation/ROMs
|
||||
ln -s $new_roms_path/roms /var/config/emulationstation/ROMs
|
||||
rm -f $roms_path/roms
|
Loading…
Reference in a new issue