From e8dbc8953fe3c6d460fe0d4463d823a2f012bff6 Mon Sep 17 00:00:00 2001 From: Locutus73 Date: Wed, 9 Jan 2019 12:31:53 +0100 Subject: [PATCH] Fixed regular expression. Fixed regular expression for not matching commented parameters. --- cores_timestamp_off.sh | 3 ++- cores_timestamp_on.sh | 3 ++- scandoubler_off.sh | 3 ++- scandoubler_on.sh | 3 ++- vga_scaler_off.sh | 3 ++- vga_scaler_on.sh | 3 ++- video_info_off.sh | 3 ++- video_info_on.sh | 3 ++- video_mode_1080p50.sh | 3 ++- video_mode_1080p60.sh | 3 ++- video_mode_720p50.sh | 3 ++- video_mode_720p60.sh | 3 ++- vscale_0.25_scale.sh | 3 ++- vscale_0.5_scale.sh | 3 ++- vscale_fit_height.sh | 3 ++- vscale_integer_scale.sh | 3 ++- vsync_low_latency.sh | 3 ++- vsync_match_core.sh | 3 ++- vsync_match_display.sh | 3 ++- 19 files changed, 38 insertions(+), 19 deletions(-) diff --git a/cores_timestamp_off.sh b/cores_timestamp_off.sh index 3dde8cf..a744014 100644 --- a/cores_timestamp_off.sh +++ b/cores_timestamp_off.sh @@ -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 \ No newline at end of file diff --git a/cores_timestamp_on.sh b/cores_timestamp_on.sh index 16e9dd0..f7acff0 100644 --- a/cores_timestamp_on.sh +++ b/cores_timestamp_on.sh @@ -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 \ No newline at end of file diff --git a/scandoubler_off.sh b/scandoubler_off.sh index 1723f35..3cfb4a2 100644 --- a/scandoubler_off.sh +++ b/scandoubler_off.sh @@ -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 \ No newline at end of file diff --git a/scandoubler_on.sh b/scandoubler_on.sh index 8c0f625..9f20f42 100644 --- a/scandoubler_on.sh +++ b/scandoubler_on.sh @@ -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 \ No newline at end of file diff --git a/vga_scaler_off.sh b/vga_scaler_off.sh index 09d6cea..d794156 100644 --- a/vga_scaler_off.sh +++ b/vga_scaler_off.sh @@ -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 \ No newline at end of file diff --git a/vga_scaler_on.sh b/vga_scaler_on.sh index a2ffcc0..188f2a7 100644 --- a/vga_scaler_on.sh +++ b/vga_scaler_on.sh @@ -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 \ No newline at end of file diff --git a/video_info_off.sh b/video_info_off.sh index 1eac925..a92da35 100644 --- a/video_info_off.sh +++ b/video_info_off.sh @@ -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 \ No newline at end of file diff --git a/video_info_on.sh b/video_info_on.sh index fa594de..818d2e6 100644 --- a/video_info_on.sh +++ b/video_info_on.sh @@ -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 \ No newline at end of file diff --git a/video_mode_1080p50.sh b/video_mode_1080p50.sh index 80c7ad3..0e6b224 100644 --- a/video_mode_1080p50.sh +++ b/video_mode_1080p50.sh @@ -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 \ No newline at end of file diff --git a/video_mode_1080p60.sh b/video_mode_1080p60.sh index 53436e1..02daac8 100644 --- a/video_mode_1080p60.sh +++ b/video_mode_1080p60.sh @@ -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 \ No newline at end of file diff --git a/video_mode_720p50.sh b/video_mode_720p50.sh index 4502054..87e4d5a 100644 --- a/video_mode_720p50.sh +++ b/video_mode_720p50.sh @@ -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 \ No newline at end of file diff --git a/video_mode_720p60.sh b/video_mode_720p60.sh index 7150694..60dc308 100644 --- a/video_mode_720p60.sh +++ b/video_mode_720p60.sh @@ -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 \ No newline at end of file diff --git a/vscale_0.25_scale.sh b/vscale_0.25_scale.sh index 2a3d6a8..b1969b7 100644 --- a/vscale_0.25_scale.sh +++ b/vscale_0.25_scale.sh @@ -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 \ No newline at end of file diff --git a/vscale_0.5_scale.sh b/vscale_0.5_scale.sh index 74cbe56..de61440 100644 --- a/vscale_0.5_scale.sh +++ b/vscale_0.5_scale.sh @@ -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 \ No newline at end of file diff --git a/vscale_fit_height.sh b/vscale_fit_height.sh index adb59f9..85003bf 100644 --- a/vscale_fit_height.sh +++ b/vscale_fit_height.sh @@ -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 \ No newline at end of file diff --git a/vscale_integer_scale.sh b/vscale_integer_scale.sh index 3658177..e4f33b6 100644 --- a/vscale_integer_scale.sh +++ b/vscale_integer_scale.sh @@ -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 \ No newline at end of file diff --git a/vsync_low_latency.sh b/vsync_low_latency.sh index 55d8d43..23e40e3 100644 --- a/vsync_low_latency.sh +++ b/vsync_low_latency.sh @@ -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 \ No newline at end of file diff --git a/vsync_match_core.sh b/vsync_match_core.sh index 910e19b..0ab15ff 100644 --- a/vsync_match_core.sh +++ b/vsync_match_core.sh @@ -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 \ No newline at end of file diff --git a/vsync_match_display.sh b/vsync_match_display.sh index b66f016..fb2170b 100644 --- a/vsync_match_display.sh +++ b/vsync_match_display.sh @@ -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 \ No newline at end of file