mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-01-31 04:25:39 +00:00
Helper file deployment function
This commit is contained in:
parent
d90903213d
commit
b613ae2b84
|
@ -0,0 +1,5 @@
|
|||
# The proper format of this file is
|
||||
# FILE NAME^DESTINATION
|
||||
# The destination can be an internal variable name like $roms_folder if needed
|
||||
# The FILE name can have spaces in it, but the DESTINATION cannot, even in variable form
|
||||
RetroDECK Example Readme.txt^$rdhome
|
16
functions.sh
16
functions.sh
|
@ -1061,7 +1061,7 @@ conf_write() {
|
|||
|
||||
while IFS= read -r current_setting_line # Read the existing retrodeck.cfg
|
||||
do
|
||||
if [[ (! -z "$current_setting_line") && (! "$current_setting_line" == "#!/bin/bash") && (! "$current_setting_line" == "[]") ]]; then # If the line has a valid entry in it
|
||||
if [[ (! -z "$current_setting_line") && (! "$current_setting_line" == "#"*) && (! "$current_setting_line" == "[]") ]]; then # If the line has a valid entry in it
|
||||
if [[ ! -z $(grep -o -P "^\[.+?\]$" <<< "$current_setting_line") ]]; then # If the line is a section header
|
||||
current_section=$(sed 's^[][]^^g' <<< $current_setting_line) # Remove brackets from section name
|
||||
else
|
||||
|
@ -1082,7 +1082,7 @@ conf_read() {
|
|||
|
||||
while IFS= read -r current_setting_line # Read the existing retrodeck.cfg
|
||||
do
|
||||
if [[ (! -z "$current_setting_line") && (! "$current_setting_line" == "#!/bin/bash") && (! "$current_setting_line" == "[]") ]]; then # If the line has a valid entry in it
|
||||
if [[ (! -z "$current_setting_line") && (! "$current_setting_line" == "#"*) && (! "$current_setting_line" == "[]") ]]; then # If the line has a valid entry in it
|
||||
if [[ ! -z $(grep -o -P "^\[.+?\]$" <<< "$current_setting_line") ]]; then # If the line is a section header
|
||||
current_section=$(sed 's^[][]^^g' <<< $current_setting_line) # Remove brackets from section name
|
||||
else
|
||||
|
@ -1171,6 +1171,18 @@ update_splashscreens() {
|
|||
cp -rf /app/retrodeck/graphics/* /var/config/emulationstation/.emulationstation/resources/graphics
|
||||
}
|
||||
|
||||
deploy_helper_files() {
|
||||
|
||||
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"
|
||||
fi
|
||||
|
||||
done < "$helper_files_list"
|
||||
}
|
||||
|
||||
prepare_emulator() {
|
||||
# This function will perform one of several actions on one or more emulators
|
||||
# The actions currently include "reset" and "postmove"
|
||||
|
|
|
@ -28,6 +28,8 @@ hard_version="$(cat '/app/retrodeck/version')"
|
|||
rd_repo="https://github.com/XargonWan/RetroDECK" # The URL of the main RetroDECK GitHub repo
|
||||
es_themes_list="https://gitlab.com/es-de/themes/themes-list/-/raw/master/themes.json" # The URL of the ES-DE 2.0 themes list
|
||||
remote_network_target="https://one.one.one.one" # The URL of a common internet target for testing network access
|
||||
helper_files_folder="$emuconfigs/defaults/retrodeck/helper_files" # The parent folder of RetroDECK documentation files for deployment
|
||||
helper_files_list="$emuconfigs/defaults/retrodeck/reference_lists/helper_files_list.cfg" # The list of files to be deployed and where they go
|
||||
rpcs3_firmware="http://dus01.ps3.update.playstation.net/update/ps3/image/us/2023_0228_05fe32f5dc8c78acbcd84d36ee7fdc5b/PS3UPDAT.PUP"
|
||||
|
||||
# Config files for emulators with single config files
|
||||
|
|
Loading…
Reference in a new issue