Move sanitize() function to other_functions.sh

This commit is contained in:
icenine451 2025-03-25 09:39:06 -04:00
parent 5da28562d4
commit 72efc37248
2 changed files with 7 additions and 5 deletions

View file

@ -1401,3 +1401,9 @@ repair_paths() {
configurator_generic_dialog "RetroDECK Path Repair" "All RetroDECK folders were found at their expected locations."
fi
}
# Function to sanitize strings for filenames
sanitize() {
# Replace sequences of underscores with a single space
echo "$1" | sed -e 's/_\{2,\}/ /g' -e 's/_/ /g' -e 's/:/ -/g' -e 's/&/and/g' -e 's%/%and%g' -e 's/ / /g'
}

View file

@ -1,10 +1,6 @@
#!/bin/bash
# Function to sanitize strings for filenames
sanitize() {
# Replace sequences of underscores with a single space
echo "$1" | sed -e 's/_\{2,\}/ /g' -e 's/_/ /g' -e 's/:/ -/g' -e 's/&/and/g' -e 's%/%and%g' -e 's/ / /g'
}
add_to_steam() {