Forcing locale "C" to avoid grep ambiguities and locale bugs

master
Thomas Schmitt 3 years ago
parent 157cb19092
commit 697c8cc1f9
  1. 5
      xorriso-dd-target/xorriso-dd-target

@ -5,6 +5,9 @@
# Thomas Schmitt <scdbackup@gmx.net>
# Provided under GPL version 2 or later.
export LANG=C
export LC_ALL=C
# Check whether we are on GNU/Linux
if uname -s | grep -v '^Linux' >/dev/null
then
@ -139,7 +142,7 @@ round_down_div_million() {
check_parameter() {
if test "$2" = "device_name"
then
if echo "$1" | grep '[^A-za-z0-9_/-]' >/dev/null
if echo "$1" | grep '[^A-Za-z0-9_/-]' >/dev/null
then
echo "SORRY: Given device name contains unexpected character. Ok: [A-za-z0-9_/-]" >&2
exit 12

Loading…
Cancel
Save