Last active
October 27, 2023 03:28
-
-
Save ileathan/549457c4c51e86c6fbd8545f2e73e72f to your computer and use it in GitHub Desktop.
Hacked Switch Tinfoil Custom Index Generation (From Games Directory)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# USAGE: | |
# | |
# Navigate to the directory that has all the switch rom files (your shop) and run this code. | |
# A shop.tfl file will be created in your local directory (you should be in your shop) | |
# which you can serve over http or however you chose to serve it. | |
# This just has the file location/size for now. | |
echo -e '{"files":[\n' >> shop.tfl;for f in *.nsp *.xci; do echo -e "{\n\"url\": \"$f\",\n\"size\": "$(stat "$f"|grep -oP "Size: \K\d+")"\n}," >> shop.tfl;done; echo "]}" >> shop.tfl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment