initial checkin
[zsh-lovers.git] / zsh_people / strcat / zlogin
1 # $Id: .zlogin,v 1.1 2004/06/10 09:59:46 dope Exp dope $
2 #
3 # .zlogin is sourced in login shells.  It should contain commands that
4 # should be executed only in login shells.  It should be used to run a
5 # series of external commands (fortune, msgs, etc).
6 #
7 # Check incoming ftp files.
8 if [[ $(uname -n) = painless ]]
9 then
10         INCOMING=/home/ftp/pub/incoming
11         if [[ -d ${INCOMING} ]]
12         then
13                 pushd ${INCOMING}
14                 newfiles=( )
15                 [[ -a .timestamp ]] || touch .timestamp
16                 setopt nullglob
17                 for file in ^.timestamp
18                         [[ $file -nt .timestamp ]] && newfiles=( $newfiles $file )
19                         if [[ -n $newfiles ]]
20                         then
21                                 echo "New files in ${INCOMING}:"
22                                 echo "  "$newfiles
23                                 echo ""
24                         fi
25                         touch .timestamp
26                         popd
27                 fi
28         fi
29
30 # Check for TODO-entry
31 if [[ -e ~/TODO ]]
32 then
33         echo "Note: New TODO - entry!"
34         echo
35         cat ~/TODO
36         echo
37 fi