Fixed regular expression.

Fixed regular expression for not matching commented parameters.
This commit is contained in:
Locutus73
2019-01-09 12:31:53 +01:00
committed by GitHub
parent a22e70676e
commit e8dbc8953f
19 changed files with 38 additions and 19 deletions

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.0.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.0 - 2019-01-08 - First commit.
if [ ! -f "/media/fat/config/MiSTer.ini" ]
@@ -32,7 +33,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
DATECODE_VALUE=1
sed -i "1,/rbf_hide_datecode=[0-9]/{s/rbf_hide_datecode=[0-9]/rbf_hide_datecode=$DATECODE_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*rbf_hide_datecode=[0-9]*/{s/^\s*rbf_hide_datecode=[0-9]*/rbf_hide_datecode=$DATECODE_VALUE/}" /media/fat/config/MiSTer.ini
echo "rbf_hide_datecode=$DATECODE_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.0.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.0 - 2019-01-08 - First commit.
if [ ! -f "/media/fat/config/MiSTer.ini" ]
@@ -32,7 +33,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
DATECODE_VALUE=0
sed -i "1,/rbf_hide_datecode=[0-9]/{s/rbf_hide_datecode=[0-9]/rbf_hide_datecode=$DATECODE_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*rbf_hide_datecode=[0-9]*/{s/^\s*rbf_hide_datecode=[0-9]*/rbf_hide_datecode=$DATECODE_VALUE/}" /media/fat/config/MiSTer.ini
echo "rbf_hide_datecode=$DATECODE_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.0.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.0 - 2019-01-08 - First commit.
if [ ! -f "/media/fat/config/MiSTer.ini" ]
@@ -32,7 +33,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
SCANDOUBLER_VALUE=0
sed -i "1,/forced_scandoubler=[0-9]/{s/forced_scandoubler=[0-9]/forced_scandoubler=$SCANDOUBLER_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*forced_scandoubler=[0-9]*/{s/^\s*forced_scandoubler=[0-9]*/forced_scandoubler=$SCANDOUBLER_VALUE/}" /media/fat/config/MiSTer.ini
echo "forced_scandoubler=$SCANDOUBLER_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.0.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.0 - 2019-01-08 - First commit.
if [ ! -f "/media/fat/config/MiSTer.ini" ]
@@ -32,7 +33,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
SCANDOUBLER_VALUE=1
sed -i "1,/forced_scandoubler=[0-9]/{s/forced_scandoubler=[0-9]/forced_scandoubler=$SCANDOUBLER_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*forced_scandoubler=[0-9]*/{s/^\s*forced_scandoubler=[0-9]*/forced_scandoubler=$SCANDOUBLER_VALUE/}" /media/fat/config/MiSTer.ini
echo "forced_scandoubler=$SCANDOUBLER_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.0.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.0 - 2019-01-08 - First commit.
if [ ! -f "/media/fat/config/MiSTer.ini" ]
@@ -32,7 +33,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VGA_SCALER_VALUE=0
sed -i "1,/vga_scaler=[0-9]/{s/vga_scaler=[0-9]/vga_scaler=$VGA_SCALER_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*vga_scaler=[0-9]*/{s/^\s*vga_scaler=[0-9]*/vga_scaler=$VGA_SCALER_VALUE/}" /media/fat/config/MiSTer.ini
echo "vga_scaler=$VGA_SCALER_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.0.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.0 - 2019-01-08 - First commit.
if [ ! -f "/media/fat/config/MiSTer.ini" ]
@@ -32,7 +33,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VGA_SCALER_VALUE=1
sed -i "1,/vga_scaler=[0-9]/{s/vga_scaler=[0-9]/vga_scaler=$VGA_SCALER_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*vga_scaler=[0-9]*/{s/^\s*vga_scaler=[0-9]*/vga_scaler=$VGA_SCALER_VALUE/}" /media/fat/config/MiSTer.ini
echo "vga_scaler=$VGA_SCALER_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.0.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.0 - 2019-01-08 - First commit.
if [ ! -f "/media/fat/config/MiSTer.ini" ]
@@ -32,7 +33,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VIDEO_INFO_VALUE=0
sed -i "1,/video_info=[0-9]/{s/video_info=[0-9]/video_info=$VIDEO_INFO_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*video_info=[0-9]*/{s/^\s*video_info*=[0-9]/video_info=$VIDEO_INFO_VALUE/}" /media/fat/config/MiSTer.ini
echo "video_info=$VIDEO_INFO_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.0.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.0 - 2019-01-08 - First commit.
if [ ! -f "/media/fat/config/MiSTer.ini" ]
@@ -32,7 +33,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VIDEO_INFO_VALUE=10
sed -i "1,/video_info=[0-9]/{s/video_info=[0-9]/video_info=$VIDEO_INFO_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\*svideo_info=[0-9]*/{s/^\s*video_info=[0-9]*/video_info=$VIDEO_INFO_VALUE/}" /media/fat/config/MiSTer.ini
echo "video_info=$VIDEO_INFO_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.0.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.0 - 2019-01-08 - First commit.
if [ ! -f "/media/fat/config/MiSTer.ini" ]
@@ -32,7 +33,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VIDEO_VALUE=9
sed -i "1,/video_mode=[0-9]/{s/video_mode=[0-9]/video_mode=$VIDEO_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*video_mode=[0-9]*/{s/^\s*video_mode=[0-9]*/video_mode=$VIDEO_VALUE/}" /media/fat/config/MiSTer.ini
echo "video_mode=$VIDEO_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.0.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.0 - 2019-01-08 - First commit.
if [ ! -f "/media/fat/config/MiSTer.ini" ]
@@ -32,7 +33,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VIDEO_VALUE=8
sed -i "1,/video_mode=[0-9]/{s/video_mode=[0-9]/video_mode=$VIDEO_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*video_mode=[0-9]*/{s/^\s*video_mode=[0-9]*/video_mode=$VIDEO_VALUE/}" /media/fat/config/MiSTer.ini
echo "video_mode=$VIDEO_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.0.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.0 - 2019-01-08 - First commit.
if [ ! -f "/media/fat/config/MiSTer.ini" ]
@@ -32,7 +33,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VIDEO_VALUE=7
sed -i "1,/video_mode=[0-9]/{s/video_mode=[0-9]/video_mode=$VIDEO_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*video_mode=[0-9]*/{s/^\s*video_mode=[0-9]*/video_mode=$VIDEO_VALUE/}" /media/fat/config/MiSTer.ini
echo "video_mode=$VIDEO_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.0.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.0 - 2019-01-08 - First commit.
if [ ! -f "/media/fat/config/MiSTer.ini" ]
@@ -32,7 +33,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VIDEO_VALUE=0
sed -i "1,/video_mode=[0-9]/{s/video_mode=[0-9]/video_mode=$VIDEO_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*video_mode=[0-9]*/{s/^\s*video_mode=[0-9]*/video_mode=$VIDEO_VALUE/}" /media/fat/config/MiSTer.ini
echo "video_mode=$VIDEO_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.1.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.1 - 2019-01-08 - MiSTer.ini downloaded from GitHub if missing.
# Version 1.0 - 2019-01-07 - First commit.
@@ -33,7 +34,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VSCALE_VALUE=3
sed -i "1,/vscale_mode=[0-9]/{s/vscale_mode=[0-9]/vscale_mode=$VSCALE_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*vscale_mode=[0-9]*/{s/^\s*vscale_mode=[0-9]*/vscale_mode=$VSCALE_VALUE/}" /media/fat/config/MiSTer.ini
echo "vscale_mode=$VSCALE_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.1.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.1 - 2019-01-08 - MiSTer.ini downloaded from GitHub if missing.
# Version 1.0 - 2019-01-07 - First commit.
@@ -33,7 +34,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VSCALE_VALUE=2
sed -i "1,/vscale_mode=[0-9]/{s/vscale_mode=[0-9]/vscale_mode=$VSCALE_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*vscale_mode=[0-9]*/{s/^\s*vscale_mode=[0-9]*/vscale_mode=$VSCALE_VALUE/}" /media/fat/config/MiSTer.ini
echo "vscale_mode=$VSCALE_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.1.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.1 - 2019-01-08 - MiSTer.ini downloaded from GitHub if missing.
# Version 1.0 - 2019-01-07 - First commit.
@@ -33,7 +34,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VSCALE_VALUE=0
sed -i "1,/vscale_mode=[0-9]/{s/vscale_mode=[0-9]/vscale_mode=$VSCALE_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*vscale_mode=[0-9]*/{s/^\s*vscale_mode=[0-9]*/vscale_mode=$VSCALE_VALUE/}" /media/fat/config/MiSTer.ini
echo "vscale_mode=$VSCALE_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.1.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.1 - 2019-01-08 - MiSTer.ini downloaded from GitHub if missing.
# Version 1.0 - 2019-01-07 - First commit.
@@ -33,7 +34,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VSCALE_VALUE=1
sed -i "1,/vscale_mode=[0-9]/{s/vscale_mode=[0-9]/vscale_mode=$VSCALE_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*vscale_mode=[0-9]*/{s/^\s*vscale_mode=[0-9]*/vscale_mode=$VSCALE_VALUE/}" /media/fat/config/MiSTer.ini
echo "vscale_mode=$VSCALE_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.1.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.1 - 2019-01-08 - MiSTer.ini downloaded from GitHub if missing.
# Version 1.0 - 2019-01-07 - First commit.
@@ -33,7 +34,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VSYNC_VALUE=2
sed -i "1,/vsync_adjust=[0-9]/{s/vsync_adjust=[0-9]/vsync_adjust=$VSYNC_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*vsync_adjust=[0-9]*/{s/^\s*vsync_adjust=[0-9]*/vsync_adjust=$VSYNC_VALUE/}" /media/fat/config/MiSTer.ini
echo "vsync_adjust=$VSYNC_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.1.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.1 - 2019-01-08 - MiSTer.ini downloaded from GitHub if missing.
# Version 1.0 - 2019-01-07 - First commit.
@@ -33,7 +34,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VSYNC_VALUE=1
sed -i "1,/vsync_adjust=[0-9]/{s/vsync_adjust=[0-9]/vsync_adjust=$VSYNC_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*vsync_adjust=[0-9]*/{s/^\s*vsync_adjust=[0-9]*/vsync_adjust=$VSYNC_VALUE/}" /media/fat/config/MiSTer.ini
echo "vsync_adjust=$VSYNC_VALUE"
reboot now
exit 0

View File

@@ -18,6 +18,7 @@
# You can download the latest version of this script from:
# https://github.com/MiSTer-devel/Scripts_MiSTer
# Version 1.1.1 - 2019-01-09 - Fixed regular expression for not matching commented parameters.
# Version 1.1 - 2019-01-08 - MiSTer.ini downloaded from GitHub if missing.
# Version 1.0 - 2019-01-07 - First commit.
@@ -33,7 +34,7 @@ then
fi
cp /media/fat/config/MiSTer.ini /media/fat/config/MiSTer.ini.bak
VSYNC_VALUE=0
sed -i "1,/vsync_adjust=[0-9]/{s/vsync_adjust=[0-9]/vsync_adjust=$VSYNC_VALUE/}" /media/fat/config/MiSTer.ini
sed -i "1,/^\s*vsync_adjust=[0-9]*/{s/^\s*vsync_adjust=[0-9]*/vsync_adjust=$VSYNC_VALUE/}" /media/fat/config/MiSTer.ini
echo "vsync_adjust=$VSYNC_VALUE"
reboot now
exit 0