#!/bin/bash

# timezone: edits timezone.cfg

if [ -e timezone.cfg ]
then
    FILE="timezone.cfg"
elif [ -e $HOME/bin/timezone.cfg ]
then
    FILE="$HOME/bin/timezone.cfg"
elif [ -e /usr/local/bin/timezone.cfg ]
then
    FILE="/usr/local/bin/timezone.cfg"
else
    echo "timezone: there is no timezone.cfg database."
    exit
fi

for EDITOR in mcedit nano pico elvis vim vi
do
    if [ -x `which $EDITOR` ]
    then
	break
    fi
done

$EDITOR $FILE
