File: autogen.sh

package info (click to toggle)
synce-multisync-plugin 0.9.0-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,644 kB
  • ctags: 151
  • sloc: sh: 8,023; ansic: 1,778; makefile: 71
file content (49 lines) | stat: -rwxr-xr-x 941 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
set -e
VERSION=`cat VERSION`

if [ -z "$VERSION" ]; then
	echo "Empty version"
	exit 1
fi

# create configure.ac with correct version number
ACFILE="configure.ac"
ACFILE_IN="$ACFILE.in"
if [ -f $ACFILE ]; then
	rm $ACFILE
fi
echo -n "Creating $ACFILE..."
cat $ACFILE_IN | sed "s/\\(AM_INIT_AUTOMAKE(.*,\\).*)/\\1 $VERSION)/" > $ACFILE
if [ -s $ACFILE ]; then
	echo "done."
else
	exit 1
fi

# create .spec file with correct version number
for SPEC_IN in "*.spec.in"; do
	SPEC=`basename $SPEC_IN .in`
	if [ -f $SPEC ]; then
		rm $SPEC
	fi
	echo -n "Creating $SPEC..."
	cat $SPEC_IN | sed "s/^\\(Version:\\).*/\\1 $VERSION/" > $SPEC
	if [ -s $SPEC ]; then
		echo "done."
	else
		exit 1
	fi
done

rm -f config.cache
if [ -d "m4" ]; then
	ACLOCAL_FLAGS="-I m4 $ACLOCAL_FLAGS"
fi

which gnome-autogen.sh || {
        echo "You need to install gnome-common from the GNOME CVS"
        exit 1
}
 
USE_GNOME2_MACROS=1 . gnome-autogen.sh $@