view mcabber/hgcset.sh @ 2304:fa8365fb6ac2

[PATCH 1/3] New option: vi_mode If the new vi_mode option is set to 1, let MCabber's non-chat mode accept a few commands loosely based on those available in vi(1)'s normal mode, e.g.: A Call "/roster unread_first". a Call "/roster unread_next". F Call "/roster group_prev". f Call "/roster group_next". G Call "/roster bottom". gg Call "/roster top". i Enter chat mode. [<n>]j Call "/roster down [<n>]". [<n>]k Call "/roster up [<n>]". n Repeat the previous search (if any). O Call "/roster unread_first" and open chat window. o Call "/roster unread_next" and open chat window. ZZ Call "/quit". zM Call "/group fold" for all groups. zR Call "/group unfold" for all groups. <Space> Call "/group toggle" for the current group. '' Call "/roster alternate". ! Toggle attention flag for current buddy. # Toggle unread messages flag for current buddy. /<str> Call "/roster search <str>". :q Call "/quit". :wq Call "/quit". :x Call "/quit". :<n> Jump to line <n> in the roster. :<cmd> Call "/<cmd>" (unless <cmd> matches one of the above commands).
author Holger Weiß <holger@zedat.fu-berlin.de>
date Wed, 22 Jul 2015 19:25:22 +0200
parents e8f2db654e67
children
line wrap: on
line source

#! /bin/sh

srcdir="$1"
builddir="$2"

if [ ! -f "$srcdir/logprint.h" ]; then
  echo "Unable to find mcabber sources!" >&2
  exit 1
fi

cd "$srcdir"

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" "$builddir/hgcset.h" > /dev/null 2>&1 || \
        echo "#define HGCSET \"$cs\"" > "$builddir/hgcset.h"
      exit 0
    fi
  fi
fi

echo > "$builddir/hgcset.h"