File: mkdata.sh

package info (click to toggle)
allegro4.4 2:4.4.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 20,744 kB
  • sloc: ansic: 164,458; asm: 17,620; cpp: 3,848; objc: 1,687; sh: 1,107; python: 676; pascal: 179; makefile: 55; perl: 29; lisp: 1
file content (34 lines) | stat: -rwxr-xr-x 777 bytes parent folder | download | duplicates (7)
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
34
#!/bin/sh
#
# Create `languages.dat' and `keyboard.dat' from `resource' directory.
#

case "$DAT" in
    "")
	# DAT not supplied.  Assume dat is installed on the PATH.
	DAT=dat
	;;
    ./*|../*)
	# DAT supplied and looks like relative path.
	# Assume it is and make it absolute.
	DAT="`pwd`/$DAT"
	;;
    *)
	# DAT supplied.
	;;
esac

# Make sure that dat actually is available.
if ! ($DAT ; true) 2>/dev/null | fgrep -q 'Allegro'
then
    echo "$0: dat tool not available, aborted"
    exit 1
fi

echo "Creating keyboard.dat..."
(cd resource/keyboard; LD_PRELOAD=$MKDATA_PRELOAD $DAT -a -c1 ../../keyboard.dat *.cfg)

echo "Creating languages.dat..."
(cd resource/language; LD_PRELOAD=$MKDATA_PRELOAD $DAT -a -c1 ../../language.dat *.cfg)

chmod 664 keyboard.dat language.dat