File: gen-hdr.sh

package info (click to toggle)
swirc 3.5.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,872 kB
  • sloc: ansic: 18,094; cpp: 17,518; sh: 960; python: 254; makefile: 102; javascript: 20
file content (33 lines) | stat: -rwxr-xr-x 723 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh

if [ $# -ne 1 ]; then
	echo "bogus number of args"
	exit 1
fi

HDRPATH=src/include/swircpaths.h

PREFIX=$1
shift

cat <<EOF >${HDRPATH}
#ifndef _SWIRCPATHS_H_
#define _SWIRCPATHS_H_

#define SWIRC_BTD_PATH "${PREFIX}/share/locale"
#define SWIRC_ICON_PATH "${PREFIX}/share/swirc/swirc-royal.png"

#define HUNSPELL_PATH "${PREFIX}/share/hunspell"

#define LC_MSGS_DE	"${PREFIX}/share/locale/de/LC_MESSAGES/swirc.mo"
#define LC_MSGS_FI	"${PREFIX}/share/locale/fi/LC_MESSAGES/swirc.mo"
#define LC_MSGS_FR	"${PREFIX}/share/locale/fr/LC_MESSAGES/swirc.mo"
#define LC_MSGS_SV	"${PREFIX}/share/locale/sv/LC_MESSAGES/swirc.mo"

#endif
EOF

if [ ! -r ${HDRPATH} ]; then
	echo "fatal: error creating ${HDRPATH}"
	exit 1
fi