view mcabber/hgcset.sh @ 1841:8ad982f83fd6

[xttitle] Add option xttitle_short_format As suggested by Pavel Ulpi in issue #51: - A title is set as soon as the module is loaded, - The option xttitle_short_format can be set to 1 to have a very short title Notes: - The terminal title will only display the number of unread nuffers after the unread list has changed (not right after the module loading), - The title is reset to "MCabber" when the module is unloaded.
author Mikael Berthe <mikael@lilotux.net>
date Sun, 28 Mar 2010 10:56:42 +0200
parents 41c26b7d2890
children e8f2db654e67
line wrap: on
line source

#! /bin/sh

if [ ! -f logprint.h ]; then
  echo "You are not in the mcabber directory" >&2
  exit 1
fi

if which hg > /dev/null 2>&1; then
  cs=$(hg id 2> /dev/null | cut -d' ' -f1)
  if test $? -eq 0; then
    if [ x"$cs" != x ]; then
      grep -q "$cs" hgcset.h > /dev/null 2>&1 || \
        echo "#define HGCSET \"$cs\"" > hgcset.h
      exit 0
    fi
  fi
fi

echo > hgcset.h