]> jfr.im git - irc/rqf/shadowircd.git/blob - scripts/application.sh
Update TODO.
[irc/rqf/shadowircd.git] / scripts / application.sh
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
22 if [ "x$TIP" = "x" ]; then
23 echo "Please don't run me directly."
24 exit
25 fi
26
27 # Charybdis wants the hg tip to be in include/serno.h, in its own format.
28 MYTIP=`hg parents --template '{date|shortdate}_{node|short}' 2>/dev/null | sed -e s/-//g -e s/_/-/`
29 echo "[charybdis] Generating include/serno.h for tip $MYTIP."
30 cat << _EOF_ > include/serno.h
31 /* Generated automatically by makepackage. Any changes made here will be lost. */
32 #define SERNO "$MYTIP"
33 _EOF_