annotate mcabber/hgcset.sh @ 1229:e9ea1497ac9d

Fix a key binding issue on FreeBSD The problem is that on FreeBSD with wide ncurses support, isprint() returns TRUE for special key codes like Fn, KEY_PPAGE, etc. This (ugly) patch makes possible for these special keys to be bound anyway.
author Mikael Berthe <mikael@lilotux.net>
date Fri, 08 Jun 2007 16:35:02 +0200
parents e6d42f239541
children 6cb8edbda6d2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
777
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
1 #! /bin/sh
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
2
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
3 if [ ! -f logprint.h ]; then
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
4 echo "You are not in the src directory" >&2
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
5 exit 1
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
6 fi
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
7
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
8 if which hg > /dev/null 2>&1; then
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
9 cs=$(hg id 2> /dev/null | cut -d' ' -f1)
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
10 if test $? -eq 0; then
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
11 grep -q "$cs" hgcset.h > /dev/null 2>&1 || \
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
12 echo "#define HGCSET \"$cs\"" > hgcset.h
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
13 exit 0
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
14 fi
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
15 fi
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
16
e6d42f239541 "/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
17 echo > hgcset.h