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

$progdir/back/printstr "Backing up system data..."
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 "System data has been backed up as TF 1: back/backup. zip file"
sleep 2
sync
