#!/bin/sh
progdir=`dirname "$0"`
backfile="/mnt/mmc/Mod/back/backup.zip"

$progdir/back/printstr "正在备份系统数据..."
sleep 1
mkdir -p /mnt/mmc/Mod/back
rm -f $backfile
for file in /mnt/mmc/CFW/config/coremapping.json \
            /mnt/mmc/CFW/retroarch/.retroarch/retroarch.cfg \
            /mnt/mmc/CFW/retroarch/.retroarch/content_favorites.lpl \
            /mnt/mmc/CFW/retroarch/.retroarch/content_music_history.lpl \
            /mnt/mmc/CFW/retroarch/.retroarch/config/
do
zip -g -r $backfile $file
done
$progdir/back/printstr "系统数据已备份为卡1：BACK/backup.zip 文件"
sleep 2
sync
