mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-27 16:15:42 +00:00
HELPER_FILES: get them from the wiki
This commit is contained in:
parent
6b86d79d74
commit
54d3742575
|
@ -4,21 +4,23 @@
|
|||
# The FILE name can have spaces in it, but the DESTINATION cannot, even in variable form
|
||||
|
||||
# mods
|
||||
how-to-install-citra-mods.txt^$mods_folder/Citra
|
||||
how-to-install-dolphin-mods.txt^$mods_folder/Dolphin
|
||||
how-to-install-primehack-mods.txt^$mods_folder/Primehack
|
||||
how-to-install-yuzu-mods.txt^$mods_folder/Yuzu
|
||||
https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/citra/citra-texture-pack/^$mods_folder/Citra
|
||||
|
||||
# textures
|
||||
how-to-install-Mesen-textures.txt^$texture_packs_folder/RetroArch-Mesen
|
||||
how-to-install-PPSSPP-textures.txt^$texture_packs_folder/PPSSPP
|
||||
how-to-install-PCSX2-textures.txt^$texture_packs_folder/PCSX2
|
||||
how-to-install-Mupen64Plus-textures.txt^$texture_packs_folder/RetroArch-Mupen64Plus/cache
|
||||
how-to-install-Mupen64Plus-textures.txt^$texture_packs_folder/RetroArch-Mupen64Plus/hires_texture
|
||||
how-to-install-Duckstation-textures.txt^$texture_packs_folder/Duckstation
|
||||
|
||||
# customs
|
||||
how-to-install-custom-emulators.txt^$rdhome/customs
|
||||
|
||||
# emulators
|
||||
how-to-install-psvita-games.txt^$roms_folder/psvita
|
||||
# TODO: fi it's working populate this
|
||||
# how-to-install-dolphin-mods.txt^$mods_folder/Dolphin
|
||||
# how-to-install-primehack-mods.txt^$mods_folder/Primehack
|
||||
# how-to-install-yuzu-mods.txt^$mods_folder/Yuzu
|
||||
#
|
||||
# # textures
|
||||
# how-to-install-Mesen-textures.txt^$texture_packs_folder/RetroArch-Mesen
|
||||
# how-to-install-PPSSPP-textures.txt^$texture_packs_folder/PPSSPP
|
||||
# how-to-install-PCSX2-textures.txt^$texture_packs_folder/PCSX2
|
||||
# how-to-install-Mupen64Plus-textures.txt^$texture_packs_folder/RetroArch-Mupen64Plus/cache
|
||||
# how-to-install-Mupen64Plus-textures.txt^$texture_packs_folder/RetroArch-Mupen64Plus/hires_texture
|
||||
# how-to-install-Duckstation-textures.txt^$texture_packs_folder/Duckstation
|
||||
#
|
||||
# # customs
|
||||
# how-to-install-custom-emulators.txt^$rdhome/customs
|
||||
#
|
||||
# # emulators
|
||||
# how-to-install-psvita-games.txt^$roms_folder/psvita
|
||||
|
|
|
@ -490,16 +490,43 @@ update_splashscreens() {
|
|||
|
||||
deploy_helper_files() {
|
||||
# This script will distribute helper documentation files throughout the filesystem according to the $helper_files_list
|
||||
# USAGE: deploy_helper_files
|
||||
# USAGE: deploy_helper_files <file_path>
|
||||
|
||||
while IFS='^' read -r file dest
|
||||
do
|
||||
if [[ ! "$file" == "#"* ]] && [[ ! -z "$file" ]]; then
|
||||
eval current_dest="$dest"
|
||||
cp -f "$helper_files_folder/$file" "$current_dest/$file"
|
||||
local file_path=$1
|
||||
local wiki_link
|
||||
local destination_path
|
||||
local wiki_url="https://github.com/XargonWan/RetroDECK-Wiki"
|
||||
local link_content
|
||||
local wiki_path="/tmp/wiki"
|
||||
|
||||
# Check if the file exists
|
||||
if [ ! -f "$file_path" ]; then
|
||||
echo "Error: File not found: $file_path"
|
||||
return 1
|
||||
fi
|
||||
|
||||
done < "$helper_files_list"
|
||||
# Read parameters from the file
|
||||
IFS='^' read -r wiki_link destination_path < "$file_path"
|
||||
|
||||
# Check if the repository is already cloned
|
||||
if [ ! -d "$wiki_path" ]; then
|
||||
# Clone the repository
|
||||
git clone "$wiki_url" "$wiki_path"
|
||||
fi
|
||||
|
||||
# Change to the destination path and pull the latest changes
|
||||
cd "$wiki_path" || return
|
||||
git pull origin main
|
||||
|
||||
# Copy the wiki_link file to the destination path
|
||||
cp "$wiki_link" "$destination_path"
|
||||
|
||||
# Append the link content to the end of the file
|
||||
link_content="Related wiki article can be found here:\n$wiki_link\n\nThe RetroDECK Team"
|
||||
echo -e "$link_content" >> "$destination_path"
|
||||
|
||||
# Return to the original directory if needed
|
||||
cd - || return
|
||||
}
|
||||
|
||||
easter_eggs() {
|
||||
|
|
Loading…
Reference in a new issue