mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-04-10 19:15:12 +00:00
Move sanitize() function to other_functions.sh
This commit is contained in:
parent
5da28562d4
commit
72efc37248
|
@ -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'
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
||||
|
|
Loading…
Reference in a new issue