1#!/bin/sh
2#
3#   clean_os.sh
4#
5#   Clean up the target OS name for GNUstep.
6#
7#   Copyright (C) 1997 Free Software Foundation, Inc.
8#
9#   Author:  Scott Christley <scottc@net-community.com>
10#
11#   This file is part of the GNUstep Makefile Package.
12#
13#   This library is free software; you can redistribute it and/or
14#   modify it under the terms of the GNU General Public License
15#   as published by the Free Software Foundation; either version 3
16#   of the License, or (at your option) any later version.
17#
18#   You should have received a copy of the GNU General Public
19#   License along with this library; see the file COPYING.
20#   If not, write to the Free Software Foundation,
21#   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
23# Nothing to clean right now
24case "$1" in
25    # Remove version number for FreeBSD
26    freebsd2*)
27	echo freebsdaout
28	exit 0
29	;;
30    freebsd*)
31	echo freebsd
32	exit 0
33	;;
34    # Remove version number for Darwin
35    # Versions currently most common have a quick hardcoded lookup
36    darwin9*)
37        echo darwin9
38        exit 0
39        ;;
40    darwin8*)
41        echo darwin8
42        exit 0
43        ;;
44    darwin7*)
45        echo darwin7
46        exit 0
47        ;;
48    # Any other Darwin version falls here, where we use a slower sed
49    # subprocess to remove everything but the first major number.
50    darwin*)
51        echo `echo "$1" | sed s/\\\\..*//`
52        exit 0
53        ;;
54    *)
55	echo $1
56        exit 0
57	;;
58esac
59