2001-03-02 15:37:20 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# clean_os.sh
|
|
|
|
#
|
|
|
|
# Clean up the target OS name for GNUstep.
|
|
|
|
#
|
|
|
|
# Copyright (C) 1997 Free Software Foundation, Inc.
|
|
|
|
#
|
|
|
|
# Author: Scott Christley <scottc@net-community.com>
|
|
|
|
#
|
|
|
|
# This file is part of the GNUstep Makefile Package.
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
2007-10-30 14:18:41 +00:00
|
|
|
# as published by the Free Software Foundation; either version 3
|
2001-03-02 15:37:20 +00:00
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public
|
2007-07-13 10:11:48 +00:00
|
|
|
# License along with this library; see the file COPYING.
|
2001-03-02 15:37:20 +00:00
|
|
|
# If not, write to the Free Software Foundation,
|
2005-05-22 03:20:14 +00:00
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2001-03-02 15:37:20 +00:00
|
|
|
|
|
|
|
# Nothing to clean right now
|
|
|
|
case "$1" in
|
|
|
|
# Remove version number for FreeBSD
|
2001-04-13 21:51:45 +00:00
|
|
|
freebsd2*)
|
|
|
|
echo freebsdaout
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
freebsd*)
|
|
|
|
echo freebsd
|
2001-03-02 15:37:20 +00:00
|
|
|
exit 0
|
|
|
|
;;
|
2002-03-06 11:51:06 +00:00
|
|
|
# Remove version number for Darwin
|
2008-03-30 20:18:43 +00:00
|
|
|
# Versions currently most common have a quick hardcoded lookup
|
|
|
|
darwin9*)
|
|
|
|
echo darwin9
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
darwin8*)
|
|
|
|
echo darwin8
|
2004-01-21 19:44:27 +00:00
|
|
|
exit 0
|
|
|
|
;;
|
2008-03-30 20:18:43 +00:00
|
|
|
darwin7*)
|
|
|
|
echo darwin7
|
2002-12-10 16:48:02 +00:00
|
|
|
exit 0
|
|
|
|
;;
|
2008-03-30 20:18:43 +00:00
|
|
|
# Any other Darwin version falls here, where we use a slower sed
|
|
|
|
# subprocess to remove everything but the first major number.
|
|
|
|
darwin*)
|
|
|
|
echo `echo "$1" | sed s/\\\\..*//`
|
2002-03-06 11:51:06 +00:00
|
|
|
exit 0
|
|
|
|
;;
|
2001-03-02 15:37:20 +00:00
|
|
|
*)
|
|
|
|
echo $1
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
esac
|