Changeset 293

Show
Ignore:
Timestamp:
06/06/08 22:47:33 (6 months ago)
Author:
mbr
Message:

updated to use the 'C' locale by default

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gpgdir/trunk/ChangeLog

    r292 r293  
    22    - Updated to Class::MethodMaker 2.11 from CPAN.  This helps with systems 
    33      running perl-5.10.0 and greater (such as Fedora 9). 
     4    - Updated to always set the LC_ALL environmental variable to the "C" 
     5      locale.  This can be set to other locales with a new argument --locale, 
     6      or the default locale can be used by using --no-locale argument. 
    47 
    58gpgdir-1.9 (05/31/2008): 
  • gpgdir/trunk/gpgdir

    r290 r293  
    103103my $NO_DEL_SOURCE_FILE = 0; 
    104104 
     105my $locale = 'C';  ### default LC_ALL env variable 
     106my $no_locale = 0; 
     107 
    105108### for user answers 
    106109my $ACCEPT_YES_DEFAULT = 1; 
     
    118121Getopt::Long::Configure('no_ignore_case'); 
    119122 
    120 die "[-] Use --help for usage information.\n" unless(GetOptions ( 
     123die "[*] Use --help for usage information.\n" unless(GetOptions ( 
    121124    'encrypt=s'      => \$encrypt_dir,     # Encrypt files in this directory. 
    122125    'decrypt=s'      => \$decrypt_dir,     # Decrypt files in this directory. 
     
    174177    'user-homedir=s' => \$homedir,         # Path to home directory. 
    175178    'no-preserve-times' => \$no_fs_times,  # Don't preserve mtimes or atimes. 
     179    'LC_ALL=s'       => \$locale, 
     180    'locale=s'       => \$locale,          # synonym 
     181    'no-LC_ALL'      => \$no_locale, 
     182    'no-locale'      => \$no_locale,       # synonym 
    176183    'verbose'        => \$verbose,         # Verbose mode. 
    177184    'Version'        => \$printver,        # Print version 
     
    179186)); 
    180187&usage_and_exit() if $help; 
     188 
     189### set LC_ALL env variable 
     190$ENV{'LC_ALL'} = $locale unless $no_locale; 
    181191 
    182192print "[+] gpgdir v$version (file revision: $rev_num)\n", 
     
    12741284                                  (this is not common). 
    12751285    -u, --user-homedir <dir>    - Path to home directory. 
     1286    -l, --locale <locale>       - Manually define a locale setting. 
     1287    --no-locale                 - Don't set the locale to anything (the 
     1288                                  default is the "C" locale). 
    12761289    -v, --verbose               - Run in verbose mode. 
    12771290    -V, --Version               - print version. 
  • gpgdir/trunk/gpgdir.1

    r245 r293  
    202202upon encryption or decryption. 
    203203.TP 
     204.BR \-l ", " " \-\^\-locale\ \<locale> 
     205Provide a locale setting other than the default "C" locale. 
     206.TP 
     207.BR \-\^\-no-locale 
     208Do not set the locale at all so that the default system locale will apply. 
     209.TP 
    204210.BR \-v ", " \-\^\-verbose 
    205211Run in verbose mode. 
  • gpgdir/trunk/install.pl

    r268 r293  
    8888    'home-dir=s'        => \$config_homedir, ### force a specific home dir 
    8989    'LC_ALL=s'          => \$locale, 
     90    'locale=s'          => \$locale, 
    9091    'no-LC_ALL'         => \$no_locale, 
     92    'no-locale'         => \$no_locale,  ### synonym 
    9193    'uninstall' => \$uninstall,      # Uninstall gpgdir. 
    9294    'help'      => \$print_help      # Display help.