yuzu-emu-mirror / .archive

Archived copies of unchanged original mirrored repos at the time of archival, including pull-requests
17 stars 8 forks source link

useage help #1

Open huaimogu opened 7 months ago

huaimogu commented 7 months ago

How can I convert these files into a git project?

toriningen commented 7 months ago

Hello. There are two kinds of archives in this repo.

These unfortunate workarounds are required due to GitHub's hard limit of 100 MiB per file (you have to pay for Git LFS if you want to store larger files), and that it complains if files are larger than 50 MiB. Since stitching together multiple 50 MiB files is just as inconvenient as stitching 100 MiB files, I have decided to go with safer route.

I assume you have downloaded the whole repo, but instructions are applicable if you only have a subset of files. Just make sure that if you have downloaded any split archive (.tar.xz.000, .001, .002...), you have all numbered parts with the same prefix.

Windows

You will need 7-Zip.

If you want to unpack everything, then feel free to move all the archives and split volumes in the same folder, since it would make it easier to unpack them all at one go.

Open 7-ZIp File Manager,

7-Zip will merge multiple volumes automatically. If you see "unexpected end of the archive" errors, it means you have missed some of the numbered parts.

Once the unpack is complete,

Linux

First, check if you have xz already. Assuming all the operations are done from the terminal:

xz -V

If you don't, you have to install it. The package is usually called xz-utils, refer to your distro documentation on how to install it.

Now, navigate to the folder you have the archives downloaded into. We'll create a folder to keep unpacked repos:

mkdir -p repos

To merge and unpack individual repository from single .tar.xz file:

ARCH="yuzu-assets"
tar xvf "${ARCH}.git.tar.xz" -C repos -I xz

Universal script to merge and unpack both individual and multipart archives:

ARCH="ext-windows-bin"
cat $( find . -type f -iwholename "${ARCH}.git.tar.xz*" | LANG=C sort ) | tar xv -I xz -C repos

To merge and unpack all the archives in the directory:

find . -type f -iname '*.git.tar.xz*' \
| sed -e 's/\.git\.tar\.xz\(\.[0-9]\{3\}\)\?$//' \
| sort | uniq \
| while IFS='' read -r ARCH; do \
    cat $( find . -type f -iwholename "${ARCH}.git.tar.xz*" | LANG=C sort ) | tar xv -I xz -C repos; \
  done

MacOS

First check if you have xz already. Run this in your Terminal.app:

xz -V

If you don't, you will need Homebrew. Install Homebrew, then run:

brew install xz

Now follow Linux instructions.

After you're done

Now the repos folder will contain a bunch of folders called yuzu-assets.git, yuzu-mainline.git, unicorn.git and so on. These are bare git repos you can now use to push the mirrored repo to your cloud provider of choice, or just create local working copy for it:

git clone repos/yuzu.git yuzu
toriningen commented 7 months ago

I should perhaps provide unpacking script as part of the repo... And I did.

You can run ./unpack.sh from the root of the repo to unpack everything that has been downloaded so far.

huaimogu commented 7 months ago

@toriningen Thank you very much. It's done