distribution/packages/jelos/sources/scripts/backuptool
fewtarius 8ce7d8436d
* Deprecate overlayfs for RetroArch as it's unnecessary complexity that requires resyncing.
* Fix pcsx_rearmed so the 64bit version is called from runemu.
2022-04-20 16:33:47 -04:00

29 lines
861 B
Bash
Executable file

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)
# Copyright (C) 2020 Fewtarius (https://github.com/fewtarius)
BACKUPFILE="/storage/roms/backup/BACKUP.zip"
mkdir -p "/storage/roms/backup"
case "${1}" in
"restore")
systemctl stop emustation
unzip -o ${BACKUPFILE} -d /
systemctl start emustation
;;
"backup")
[ -f "${BACKUPFILE}" ] && rm "${BACKUPFILE}"
[ -z "$2" ] && systemctl stop emustation
zip -9 -r ${BACKUPFILE} \
/storage/.cache/bluetooth/* \
/storage/.cache/connman* \
/storage/.config/system/configs/system.cfg \
/storage/.emulationstation/es_*.cfg \
/storage/.config/ppsspp/* \
/storage/.config/retroarch/* \
/storage/.emulationstation/scripts/*
[ -z "${2}" ] && systemctl start emustation
;;
esac