File: make_pg_version

package info (click to toggle)
postgresql 7.4.7-6sarge6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 11,168 kB
  • ctags: 27
  • sloc: sh: 1,903; makefile: 337; ansic: 204; perl: 69; sed: 6; tcl: 1
file content (18 lines) | stat: -rw-r--r-- 334 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
if [ -z "$1" ]
then
	echo "$0: specify a target file"
fi
if [ ! -d $1 ]
then
	echo "$1 not a directory"
fi
if [ ! -w $1 ]
then
	echo "$1 not writable"
fi

echo "#!/bin/sh
echo `grep VERSION src/Makefile.global | cut -f2 -d= | sed -e 's!^[  ]*\([0-9][0-9]*\.[0-9][0-9]*\).*!\1!'`
" > $1/pg_version
chmod 755  $1/pg_version