~ubuntu-branches/ubuntu/edgy/sope/edgy

« back to all changes in this revision

Viewing changes to gnustep-make/setlocaltz.sh

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Ley
  • Date: 2005-08-19 16:53:31 UTC
  • Revision ID: james.westby@ubuntu.com-20050819165331-hs683wz1osm708pw
Tags: upstream-4.4rc.2
ImportĀ upstreamĀ versionĀ 4.4rc.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
#
 
3
# setlocaltz.sh
 
4
#
 
5
# Determine local timezone, ask user for input, save timzone
 
6
# in GNUstep timezone file (or defaults database)
 
7
#
 
8
# Copyright (C) 1999 Free Software Foundation, Inc.
 
9
#
 
10
# Author: Scott Christley <scottc@net-community.com>
 
11
#
 
12
# Date: February 1999
 
13
 
14
# This file is part of the GNUstep Makefile Package.
 
15
#
 
16
# This library is free software; you can redistribute it and/or
 
17
# modify it under the terms of the GNU General Public License
 
18
# as published by the Free Software Foundation; either version 2
 
19
# of the License, or (at your option) any later version.
 
20
 
21
# You should have received a copy of the GNU General Public
 
22
# License along with this library; see the file COPYING.LIB.
 
23
# If not, write to the Free Software Foundation,
 
24
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
25
 
 
26
echo " "
 
27
echo "Enter the name of your timezone file"
 
28
echo "press ^D on its own line when you are done"
 
29
TZNAME=`cat`
 
30
echo " "
 
31
 
 
32
GNUSTEP_TIMEZONE=$GNUSTEP_SYSTEM_ROOT/Library/Libraries/Resources/gnustep-base/NSTimeZones
 
33
if [ -f $GNUSTEP_TIMEZONE/zones/$TZNAME ]; then
 
34
    echo Setting timezone to $TZNAME
 
35
    defaults write NSGlobalDomain "Local Time Zone" $TZNAME
 
36
    echo defaults database says local time zone is:
 
37
    defaults read NSGlobalDomain "Local Time Zone"
 
38
else
 
39
    echo ERROR: Cannot find timezone file: $TZNAME
 
40
    echo in $GNUSTEP_TIMEZONE/zones
 
41
    exit 1
 
42
fi