wok-6.x diff locale-zh_CN/receipt @ rev 14100

perl-xml-parser: up 2.41
author Samuel Trassare <samuel_trassare@yahoo.com>
date Sat Feb 23 08:46:31 2013 -0800 (2013-02-23)
parents e63d22f12936
children 919b102812ab
line diff
     1.1 --- a/locale-zh_CN/receipt	Mon May 30 00:54:30 2011 +0200
     1.2 +++ b/locale-zh_CN/receipt	Sat Feb 23 08:46:31 2013 -0800
     1.3 @@ -42,16 +42,20 @@
     1.4  
     1.5  post_install()
     1.6  {
     1.7 -	echo LANG=zh_CN.UTF-8 > /etc/locale.conf
     1.8 -	echo Asia/Shanghai > /etc/TZ
     1.9 -	export TZ=Asia/Shanghai
    1.10 -	hwclock --hctosys
    1.11 +	if [ -z "$1" ]; then
    1.12 +		echo LANG=zh_CN.UTF-8 > /etc/locale.conf
    1.13 +		echo Asia/Shanghai > /etc/TZ
    1.14 +		export TZ=Asia/Shanghai
    1.15 +		hwclock --hctosys
    1.16 +	fi
    1.17  }
    1.18  
    1.19  # Back to C if it's the last used locale.
    1.20  post_remove()
    1.21  {
    1.22 -	if grep -q $LOCALEDEF /etc/locale.conf; then
    1.23 -		echo "LANG=C" > /etc/locale.conf
    1.24 +	if [ -z "$1" ]; then
    1.25 +		if [ $(grep -q $LOCALEDEF /etc/locale.conf) ]; then
    1.26 +			echo "LANG=C" > /etc/locale.conf
    1.27 +		fi
    1.28  	fi
    1.29  }