File: cmodel.sh

package info (click to toggle)
ucommon 5.2.2-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,156 kB
  • sloc: cpp: 41,584; sh: 11,440; ansic: 511; makefile: 210
file content (51 lines) | stat: -rwxr-xr-x 975 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
50
51
#!/bin/sh
# Copyright (C) 2006-2009 David Sugar, Tycho Softworks.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

args=""
tag="no"
shell=$1
shift
cmd=$1
shift
for arg in $* ; do
	case "$arg" in
	--tag=*)
		tag="no"
		;;
	--tag)
		tag="yes"
		;;
	*)
		if test "$tag" = "no" ; then
			args="$args $arg"
		fi
		tag="no"
		;;
	esac
done

# Replace for old libtool??

version=`${cmd} --version 2>/dev/null | sed -e 's/([^)]*//g;s/^[^0-9]*//;s/[- ].*//g;q'` 
if test -z "$version" ; then
	version="1.5.x" ; fi
case "$version" in
1.3.*|1.4.*)
	tag=""
	;;
*)
	tag="--tag=CC"
	;;
esac
exec $shell $cmd $tag $args