mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			50 lines
		
	
	
	
		
			860 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
	
		
			860 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/bin/sh -e
 | 
						|
path="."
 | 
						|
if [ x"$1" != x ]; then
 | 
						|
	path="$1"
 | 
						|
fi
 | 
						|
 | 
						|
versiongit() {
 | 
						|
	gitversion=`git describe`
 | 
						|
	cat <<EOF > $path/comptime.h
 | 
						|
 | 
						|
// Do not edit!  This file was autogenerated
 | 
						|
// by the $0 script with git svn
 | 
						|
//
 | 
						|
const char* comprevision = "$gitversion";
 | 
						|
EOF
 | 
						|
exit 0
 | 
						|
}
 | 
						|
 | 
						|
versionsvn() {
 | 
						|
	svnrevision=`svnversion -n $1`
 | 
						|
	cat <<EOF > $path/comptime.h
 | 
						|
 | 
						|
// Do not edit!  This file was autogenerated
 | 
						|
// by the $0 script with subversion
 | 
						|
//
 | 
						|
const char* comprevision = "r$svnrevision";
 | 
						|
EOF
 | 
						|
exit 0
 | 
						|
}
 | 
						|
 | 
						|
versionfake() {
 | 
						|
	cat <<EOF > $path/comptime.h
 | 
						|
 | 
						|
// Do not edit!  This file was autogenerated
 | 
						|
// by the $0 script with an unknown or nonexist SCM
 | 
						|
//
 | 
						|
const char* comprevision = "illegal";
 | 
						|
EOF
 | 
						|
}
 | 
						|
 | 
						|
compversion() {
 | 
						|
touch $path/comptime.c
 | 
						|
versionfake
 | 
						|
test -d $path/.svn && versionsvn
 | 
						|
test -d $path/../.git && versiongit
 | 
						|
exit 1
 | 
						|
}
 | 
						|
 | 
						|
test -f $path/comptime.c && compversion
 | 
						|
exit 2
 |