[22eee4]: cmodel.sh Maximize Restore History

Download this file

cmodel.sh    52 lines (45 with data), 975 Bytes

 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
#!/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