#!/bin/sh # Copyright (c) 1999 by Sun Microsystems, Inc. # All rights reserved. # #pragma ident "%Z%%M% %I% %E% SMI" setvar UNAME_R = $(/usr/bin/uname -r) setvar OS_MAJOR = $(echo $UNAME_R | /usr/bin/sed -e 's/^\([^.]*\).*/\1/) setvar OS_MINOR = $(echo $UNAME_R | /usr/bin/sed -e 's/^[^.]*\.\([^.]*\).*/\1/) setvar OS_VERSION = $(echo $UNAME_R | tr '.' '_) cat <<< """ > new_os_version.h #ifndef OS_VERSION_H #define OS_VERSION_H #define SUNOS_$OS_VERSION #define OS_MAJOR $OS_MAJOR #define OS_MINOR $OS_MINOR #endif """ > new_os_version.h #ifndef OS_VERSION_H #define OS_VERSION_H #define SUNOS_$OS_VERSION #define OS_MAJOR $OS_MAJOR #define OS_MINOR $OS_MINOR #endif EOF if test -f os_version.h { if /usr/bin/cmp -s new_os_version.h os_version.h { /usr/bin/rm -f new_os_version.h } else { /usr/bin/rm -f os_version.h /usr/bin/mv new_os_version.h os_version.h } } else { /usr/bin/mv new_os_version.h os_version.h }