File: build-info

package info (click to toggle)
sawfish 1:1.3.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 11,636 kB
  • ctags: 1,327
  • sloc: lisp: 22,765; ansic: 15,810; sh: 10,203; makefile: 675; perl: 19
file content (49 lines) | stat: -rw-r--r-- 1,080 bytes parent folder | download | duplicates (5)
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
# build-info -- Generate header file containing build details
# $Id: build-info,v 1.5 2000/11/16 21:58:27 jsh Exp $

host_type="$1"
version="$2"
sawfishdir="$3"
lispdir="$4"
sawfishexecdir="$5"
localedir="$6"

[ -n "$HOSTNAME" ] \
    || HOSTNAME=`hostname` \
    || HOSTNAME=unknown

[ -n "$LOCALDOMAIN" ] \
    || LOCALDOMAIN=`dnsdomainname` \
    || LOCALDOMAIN=`domainname` \
    || LOCALDOMAIN=unknown

sys_name="$HOSTNAME.$LOCALDOMAIN"
user_name="$LOGNAME"

build_date="`date +'%a %b %e %Y'`"
build_time="`date +'%T %Z'`"

cat >build.h <<EOF
/* build.h -- Definitions relating to the current build
   Automatically generated by build-info; DO NOT EDIT! */

#ifndef BUILD_H
#define BUILD_H

#define SAWFISH_VERSION "$version"
#define SAWFISH_DIR "$sawfishdir"
#define SAWFISH_LISPDIR "$lispdir"
#define SAWFISH_EXECDIR "$sawfishexecdir"
#define SAWFISH_LOCALEDIR "$localedir"

#define HOST_TYPE "$host_type"

#define BUILD_HOST "$sys_name"
#define BUILD_USER "$user_name"

#define BUILD_DATE "$build_date"
#define BUILD_TIME "$build_time"

#endif /* BUILD_H */
EOF