Merge pull request #2491 from fewtarius/dev
Fix automount oops, fix games migration.
This commit is contained in:
commit
686283fab6
2 changed files with 11 additions and 3 deletions
|
@ -100,10 +100,16 @@ fi
|
|||
for GAMES in /storage/games-internal /storage/games-external
|
||||
do
|
||||
COUNT=$(find ${GAMES}/roms 2>/dev/null| wc -l)
|
||||
if [ "${COUNT}" -lt 10 ]
|
||||
if [ "${COUNT}" -lt 320 ]
|
||||
then
|
||||
mkdir -p "${GAMES}/roms" 2>/dev/null
|
||||
if [ ! -d "${GAMES}/roms" ]
|
||||
then
|
||||
mkdir -p "${GAMES}/roms" 2>/dev/null
|
||||
else
|
||||
find "${GAMES}/roms" -type d -empty -delete
|
||||
fi
|
||||
mv "${GAMES}/"* "${GAMES}/roms/" 2>/dev/null
|
||||
find "${GAMES}" -type d -empty -delete
|
||||
fi
|
||||
done
|
||||
systemctl restart jelos-automount
|
||||
|
|
|
@ -151,7 +151,9 @@ function find_games() {
|
|||
# Assume this is an android boot device and ignore it.
|
||||
continue
|
||||
fi
|
||||
if [ -e "${DEV}" ] && \
|
||||
ISMOUNTED="$(grep "${DEV}" /proc/mounts) >/dev/null 2>&1"
|
||||
if [ ! "$?" = 0 ] && \
|
||||
[ -e "${DEV}" ] && \
|
||||
[ ! -e "/storage/.please_resize_me" ]
|
||||
then
|
||||
GAMES_DEVICE=${DEV}
|
||||
|
|
Loading…
Reference in a new issue