~ubuntu-branches/ubuntu/oneiric/irssi/oneiric

« back to all changes in this revision

Viewing changes to irssi-version.sh

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2009-05-05 15:50:50 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090505155050-aoqlnpes7che9rtd
Tags: 0.8.13-1ubuntu1
* Merge from debian unstable (LP: #372411), remaining changes:
  - debian/patches: 03firsttimer_text
    + Adapt it so it tells you about connecting to irc.ubuntu.com and
      joining #ubuntu instead of irc.debian.org and #debian.
  - debian/patches: 90irc-ubuntu-com
* Fixed debian/patches/90irc-ubuntu-com for new irssi.conf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
if test -d "$1"/.svn ; then
 
4
        DATE=`LC_ALL=C svn info "$1" | sed -n 's/^Last Changed Date: \(.*\)/\1/p'`
 
5
elif test -d "$1"/.git ; then
 
6
        DATE=`GIT_DIR=$1/.git git log -1 --pretty=format:%ai HEAD`
 
7
else
 
8
        DATE=`awk -F '|' 'NR == 2{print substr($3, 2)}' "$1"/ChangeLog`
 
9
fi
 
10
VERSION_DATE=`echo $DATE | cut -f 1 -d ' ' | tr -d -`
 
11
VERSION_TIME=`echo $DATE | cut -f 2 -d ' ' | awk -F : '{printf "%d", $1$2}'`
 
12
echo "#define IRSSI_VERSION_DATE $VERSION_DATE"
 
13
echo "#define IRSSI_VERSION_TIME $VERSION_TIME"