Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Juuso Alasuutari (371a822624d9bbb6e5d0471b1f3173292539aba3)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Juuso Alasuutari <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Juuso Alasuutari (371a822624d9bbb6e5d0471b1f3173292539aba3)
  • Date: Wed, 9 Aug 2006 08:03:08 -0500

GIT changes to master grimoire by Juuso Alasuutari <iuso AT sourcemage.org>:

shell-term-fm/bash/HISTORY | 4 ++++
shell-term-fm/bash/profile.d/lc.sh | 27 ++++++---------------------
2 files changed, 10 insertions(+), 21 deletions(-)

New commits:
commit 371a822624d9bbb6e5d0471b1f3173292539aba3
Author: Juuso Alasuutari <iuso AT sourcemage.org>
Commit: Juuso Alasuutari <iuso AT sourcemage.org>

bash: Fix bug #11759.

diff --git a/shell-term-fm/bash/HISTORY b/shell-term-fm/bash/HISTORY
index b7f9c8d..fe9fb20 100644
--- a/shell-term-fm/bash/HISTORY
+++ b/shell-term-fm/bash/HISTORY
@@ -1,3 +1,7 @@
+2006-08-09 Juuso Alasuutari <iuso AT sourcemage.org>
+ * profile.d/lc.sh: Converted to standard sh (bug #11759),
+ simplified code.
+
2006-07-03 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* profile: appended "unset i" #12581

diff --git a/shell-term-fm/bash/profile.d/lc.sh
b/shell-term-fm/bash/profile.d/lc.sh
index 176be51..a8169cb 100644
--- a/shell-term-fm/bash/profile.d/lc.sh
+++ b/shell-term-fm/bash/profile.d/lc.sh
@@ -1,25 +1,10 @@
-#!/bin/bash
-# Enhancing support for locale support
-# First source the locale config then
-# if a var is set set it...
+#!/bin/sh
+# Source the locale config and export all variables that are set.

. /etc/sysconfig/locale

-function export_if_set() {
-
-#if the variable whose name is in $1 is not empty
-
-if [[ -n ${!1} ]]
-then
- export $1
-fi
-}
-
-LOCALE_VARS="LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE \
-LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME \
-LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_ALL"
-
-for i in $LOCALE_VARS
-do
- export_if_set "$i"
+for i in LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \
+LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT \
+LC_ALL; do
+ eval [ \"'$'$i\" ] && export $i
done



  • [SM-Commit] GIT changes to master grimoire by Juuso Alasuutari (371a822624d9bbb6e5d0471b1f3173292539aba3), Juuso Alasuutari, 08/09/2006

Archive powered by MHonArc 2.6.24.

Top of Page