File: verstamp

package info (click to toggle)
squeak-vm 1%3A4.10.2.2614-4.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 13,284 kB
  • ctags: 15,344
  • sloc: ansic: 75,096; cs: 11,191; objc: 5,494; sh: 3,170; asm: 1,533; cpp: 449; pascal: 372; makefile: 366; awk: 103
file content (25 lines) | stat: -rwxr-xr-x 547 bytes parent folder | download | duplicates (10)
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
#!/bin/sh
# 
# Write a version stamp into $1.  $2 is the compiler name.
# 
# Last edited: 2002-06-08 18:32:53 by piumarta on emilia.inria.fr

if test -f $1; then
  SERIAL=`head -1 $1 | cut -d ' ' -f 3 | sed 's/;//'`
  SERIAL=`expr $SERIAL + 1`
else
  SERIAL=1
fi

if expr "$2" : ".*gcc" >/dev/null ; then
  CC=`$2 -v 2>&1 | tail -1 | sed 's/.*based on//g' | awk '{print $1 , $3} '`
else
  CC=$2
fi

cat <<_EOF >$1
int vm_serial= $SERIAL;
char *vm_date= "`date`";
char *cc_version= "$CC";
char *ux_version= "`uname -a | sed 's, unknown,,g'`";
_EOF