This repository has been archived by the owner on Aug 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
package
executable file
·111 lines (92 loc) · 2.41 KB
/
package
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/bin/sh
# PACKAGE - Packages NUnit
NANT="tools/nant/bin/NAnt.exe"
options="-f:scripts/nunit.package.targets"
config=""
runtime=""
commands=""
passthru=false
for arg in $@
do
if [ $passthru = true ]
then
commands="$commands $arg"
continue
fi
case "$arg" in
debug|release)
config="$arg"
;;
mono-1.0|1.0)
runtime="mono-1.0"
;;
mono-2.0|2.0)
runtime="mono-2.0"
;;
mono-3.5|3.5)
runtime="mono-3.5"
;;
mono-4.0|4.0)
runtime="mono-4.0"
;;
src|docs|samples|zip|all)
commands="$commands package-$arg"
;;
source)
commands="$commands package-src"
;;
-h|--help)
echo "Builds one or more NUnit packages for distribution"
echo
echo "usage: PACKAGE [option [...] ] [ -- nantoptions ]"
echo
echo "Options may be any of the following, in any order..."
echo
echo " debug Builds debug packages (default)"
echo " release Builds release packages"
echo
echo " mono-4.0, 4.0 Builds package using Mono 4.0 profile (future)"
echo " mono-3.5, 3.5 Builds package using Mono 3.5 profile (default)"
echo " mono-2.0, 2.0 Builds package using Mono 2.0 profile"
echo " mono-1.0, 1.0 Builds package using Mono 1.0 profile"
echo
echo " src, source Builds the source package"
echo " docs Builds the documentation package"
echo " samples Builds the nunit samples package"
echo " zip Builds a binary package in zipped form"
echo " all Builds source, documentation, 3.5 and 1.0 packages"
echo
echo " -h, --help Displays this help message"
echo
echo "In addition, any valid target in the NAnt script may"
echo "be supplied as an argument. This requires some degree"
echo "of familiarity with the script, in order to avoid"
echo "use of incompatible options."
echo
exit;
;;
--)
passthru=true;
;;
*)
echo "Invalid argument: $arg"
echo
echo "Use $0 -h for more info"
echo
exit;
;;
esac
done
if [ "$commands" = "" ]
then
commands="package"
fi
if [ "$config" != "" ]
then
options="$options -D:build.config=$config"
fi
if [ "$runtime" != "" ]
then
options="$options -D:runtime.config=$runtime"
fi
exec mono $NANT $options $clean $commands