GLOBAL.SH: added some hypens

This commit is contained in:
XargonWan 2022-09-17 17:17:27 +02:00
parent f9373f44d2
commit 10874f4802

View file

@ -11,7 +11,7 @@ hard_version="$(cat '/app/retrodeck/version')" # hardcoded version (
# If there is no config file I initalize the file with the the default values # If there is no config file I initalize the file with the the default values
if [ ! -f $rd_conf ] if [ ! -f "$rd_conf" ]
then then
echo "RetroDECK config file not found in $rd_conf" echo "RetroDECK config file not found in $rd_conf"
@ -31,14 +31,14 @@ then
else else
echo "Found RetroDECK config file in $rd_conf" echo "Found RetroDECK config file in $rd_conf"
echo "Loading it" echo "Loading it"
source $rd_conf source "$rd_conf"
fi fi
conf_write() { conf_write() {
# writes the variables in the retrodeck config file # writes the variables in the retrodeck config file
echo "DEBUG: printing the config file content before writing it:" echo "DEBUG: printing the config file content before writing it:"
cat $rd_conf cat "$rd_conf"
echo "" echo ""
echo "Writing the config file: $rd_conf" echo "Writing the config file: $rd_conf"
@ -46,31 +46,31 @@ conf_write() {
# TODO: this can be optimized with a while and a list of variables to check # TODO: this can be optimized with a while and a list of variables to check
if [ ! -z "$version" ] #if the variable is not null then I update it if [ ! -z "$version" ] #if the variable is not null then I update it
then then
sed -i "s%version=.*%version=$version%" $rd_conf sed -i "s%version=.*%version=$version%" "$rd_conf"
fi fi
if [ ! -z "$rdhome" ] if [ ! -z "$rdhome" ]
then then
sed -i "s%rdhome=.*%rdhome=$rdhome%" $rd_conf sed -i "s%rdhome=.*%rdhome=$rdhome%" "$rd_conf"
fi fi
if [ ! -z "$roms_folder" ] if [ ! -z "$roms_folder" ]
then then
sed -i "s%roms_folder=.*%roms_folder=$roms_folder%" $rd_conf sed -i "s%roms_folder=.*%roms_folder=$roms_folder%" "$rd_conf"
fi fi
if [ ! -z "$media_folder" ] if [ ! -z "$media_folder" ]
then then
sed -i "s%media_folder=.*%media_folder=$media_folder%" $rd_conf sed -i "s%media_folder=.*%media_folder=$media_folder%" "$rd_conf"
fi fi
if [ ! -z "$themes_folder" ] if [ ! -z "$themes_folder" ]
then then
sed -i "s%themes_folder=.*%themes_folder=$themes_folder%" $rd_conf sed -i "s%themes_folder=.*%themes_folder=$themes_folder%" "$rd_conf"
fi fi
echo "DEBUG: New contents:" echo "DEBUG: New contents:"
cat $rd_conf cat "$rd_conf"
echo "" echo ""
} }