Skip to content

Instantly share code, notes, and snippets.

@ileathan
Last active October 27, 2023 03:29
Show Gist options
  • Save ileathan/1643b29837a558fd79530fc463ba0f14 to your computer and use it in GitHub Desktop.
Save ileathan/1643b29837a558fd79530fc463ba0f14 to your computer and use it in GitHub Desktop.
Aurora coverart restore / sharing
set -o errexit -o nounset
# The idea is simple, the format Aurora uses is #GameID_DatabaseID where the GameID stays the same and the DatabaseID changes, so we check only the first 8 chars of the backup and the new and if they match we copy over the backups cover file to the new gamedata.
for file in GameData.bak/*; do
# Remove the following as they arnt games?
for file2 in GameData/*; do
if [ "${file2:9:8}" == "00000000" ]; then
continue
fi
if [ "${file2:9:2}" == "FF" ]; then
continue
fi
# Check if the GameID's match
if [ "${file2:9:8}" == "${file:13:8}" ]; then
# Make sure the backup actually has the asset.
if test -f "${file}/GC${file:13:8}.asset"; then
echo "cp ${file}/GC${file:13:8}.asset" "${file2}"
cp "${file}/GC${file:13:8}.asset" "${file2}"
fi
fi
done
done
read -rsp $'Done! Press enter to close...\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment