]> jfr.im git - irc/rqf/shadowircd.git/blame - scripts/application.sh
Add autogen.sh, called from makerelease.sh script.
[irc/rqf/shadowircd.git] / scripts / application.sh
CommitLineData
8a99d1b9
JT
1#!/bin/sh
2# application.sh: Special package building rules for charybdis.
3#
4# Copyright (c) 2007-2008 atheme.org
5#
6# Permission to use, copy, modify, and/or distribute this software for
7# any purpose with or without fee is hereby granted, provided that the above
8# copyright notice and this permission notice appear in all copies.
9#
10# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
11# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
12# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
13# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
14# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
15# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
17# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20#
21
22if [ "x$TIP" = "x" ]; then
23 echo "Please don't run me directly."
24 exit
25fi
26
27# Charybdis wants the hg tip to be in include/serno.h, in its own format.
28MYTIP=`hg parents --template '#date|shortdate#_#node|short#' 2>/dev/null | sed -e s/-//g -e s/_/-/`
8932c8d8 29echo "[charybdis] Generating include/serno.h for tip $MYTIP."
8a99d1b9
JT
30cat << _EOF_ > include/serno.h
31/* Generated automatically by makepackage. Any changes made here will be lost. */
32#define SERNO "$MYTIP"
33_EOF_