From 55db9a39a818e82324e1304e5d886aa2cf137092 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 25 May 2010 12:32:03 +0200 Subject: [PATCH] maint: remove unneeded double quotes on RHS of shell assignments Run this command: git grep -l 'LC_[A-Z]*="' \ | xargs perl -pi -e 's/(LC_[A-Z]*)="(.*?)"/$1=$2/' * src/Makefile.am: Write LC_ALL=$$locale, not LC_ALL="$$locale". * src/date.c (main): Similar, in a comment. * tests/misc/sort-month: Write LC_ALL=$LOC, not LC_ALL="$LOC". --- src/Makefile.am | 4 ++-- src/date.c | 2 +- tests/misc/sort-month | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 4576d2829c..0630a069d4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -685,7 +685,7 @@ au_actual = authors-actual .PHONY: sc_check-AUTHORS sc_check-AUTHORS: $(all_programs) @locale=en_US.UTF-8; \ - LC_ALL="$$locale" ./cat --version \ + LC_ALL=$$locale ./cat --version \ | grep ' Torbjorn ' > /dev/null \ && { echo "$@: skipping this check"; exit 0; }; \ rm -f $(au_actual) $(au_dotdot); \ @@ -699,7 +699,7 @@ sc_check-AUTHORS: $(all_programs) elif test "$$i" = test; then \ exe='['; \ fi; \ - LC_ALL="$$locale" ./$$exe --version \ + LC_ALL=$$locale ./$$exe --version \ | perl -0 -pi -e 's/,\n/, /gm' \ | sed -n -e '/Written by /{ s//'"$$i"': /;' \ -e 's/,* and /, /; s/\.$$//; p; }'; \ diff --git a/src/date.c b/src/date.c index c39adb1c28..42f3348288 100644 --- a/src/date.c +++ b/src/date.c @@ -450,7 +450,7 @@ main (int argc, char **argv) if (! *format) { /* Do not wrap the following literal format string with _(...). - For example, suppose LC_ALL is unset, LC_TIME="POSIX", + For example, suppose LC_ALL is unset, LC_TIME=POSIX, and LANG="ko_KR". In that case, POSIX says that LC_TIME determines the format and contents of date and time strings written by date, which means "date" must generate output diff --git a/tests/misc/sort-month b/tests/misc/sort-month index 8a8e4fae2b..5ac6afde57 100755 --- a/tests/misc/sort-month +++ b/tests/misc/sort-month @@ -28,9 +28,9 @@ locale --version >/dev/null 2>&1 || # C will be used if the locale is not present for LOC in "$LOCALE_FR" "$LOCALE_FR_UTF8" "ja_JP.utf8"; do - mon="$(LC_ALL="$LOC" locale abmon 2>/dev/null);" - smon=$(LC_ALL="$LOC" locale abmon 2>/dev/null | - tr ';' '\n' | shuf | nl | LC_ALL="$LOC" sort -k2,2M | + mon="$(LC_ALL=$LOC locale abmon 2>/dev/null);" + smon=$(LC_ALL=$LOC locale abmon 2>/dev/null | + tr ';' '\n' | shuf | nl | LC_ALL=$LOC sort -k2,2M | cut -f2 | tr '\n' ';') test "$mon" = "$smon" || { fail=1; break; } done -- 2.47.3