mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-01-19 15:15:38 +00:00
STEAM_SYNC: adding more sanitized games cases
This commit is contained in:
parent
f103064111
commit
31dbca315d
|
@ -261,9 +261,12 @@ declare -A alt_command_list=(
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add games to Steam function
|
# Add games to Steam function
|
||||||
addToSteam() {
|
add_to_steam() {
|
||||||
log "i" "Starting Steam Sync"
|
log "i" "Starting Steam Sync"
|
||||||
|
|
||||||
|
steamsync_folder="$rdhome/.sync"
|
||||||
|
create_dir $steamsync_folder
|
||||||
|
|
||||||
local srm_path="/var/config/steam-rom-manager/userData/userConfigurations.json"
|
local srm_path="/var/config/steam-rom-manager/userData/userConfigurations.json"
|
||||||
if [ ! -f "$srm_path" ]; then
|
if [ ! -f "$srm_path" ]; then
|
||||||
log "e" "Steam ROM Manager configuration not initialized! Initializing now."
|
log "e" "Steam ROM Manager configuration not initialized! Initializing now."
|
||||||
|
@ -317,7 +320,8 @@ addToSteam() {
|
||||||
|
|
||||||
# Sanitize the game name for the filename: replace special characters with underscores
|
# Sanitize the game name for the filename: replace special characters with underscores
|
||||||
local sanitized_name=$(echo "$name" | sed -e 's/^A-Za-z0-9._-/ /g')
|
local sanitized_name=$(echo "$name" | sed -e 's/^A-Za-z0-9._-/ /g')
|
||||||
local sanitized_name=$(echo "$sanitized_name" | sed -e 's/:/-/g')
|
local sanitized_name=$(echo "$sanitized_name" | sed -e 's/:/ -/g')
|
||||||
|
local sanitized_name=$(echo "$sanitized_name" | sed -e 's/&/and/g')
|
||||||
local sanitized_name=$(echo "$sanitized_name" | sed -e 's/ / - /g')
|
local sanitized_name=$(echo "$sanitized_name" | sed -e 's/ / - /g')
|
||||||
local sanitized_name=$(echo "$sanitized_name" | sed -e 's/ / /g')
|
local sanitized_name=$(echo "$sanitized_name" | sed -e 's/ / /g')
|
||||||
log d "File Path: $path"
|
log d "File Path: $path"
|
||||||
|
@ -345,12 +349,10 @@ addToSteam() {
|
||||||
echo "$command \"$path\"" >> "$launcher"
|
echo "$command \"$path\"" >> "$launcher"
|
||||||
|
|
||||||
chmod +x "$launcher"
|
chmod +x "$launcher"
|
||||||
|
|
||||||
/app/bin/zypak-wrapper.sh steam-rom-manager add "$launcher"
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
steam-rom-manager add
|
||||||
log i "Steam Sync: completed"
|
log i "Steam Sync: completed"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue