4.104.114.95
Line | |
---|
1 | #! /bin/sh |
---|
2 | # |
---|
3 | # $Id$ |
---|
4 | # |
---|
5 | # RTEMS Build script. |
---|
6 | # |
---|
7 | # This script builds the RPM files then the Windows executables. |
---|
8 | # |
---|
9 | # Note: This file should be placed in crossrpms. |
---|
10 | # |
---|
11 | |
---|
12 | command_line="$0 $*" |
---|
13 | |
---|
14 | terminate() |
---|
15 | { |
---|
16 | echo "error: $*" >&2 |
---|
17 | exit 1 |
---|
18 | echo "after" |
---|
19 | } |
---|
20 | |
---|
21 | check() |
---|
22 | { |
---|
23 | if [ $? -ne 0 ]; then |
---|
24 | terminate $* |
---|
25 | fi |
---|
26 | } |
---|
27 | |
---|
28 | debug= |
---|
29 | hosts= |
---|
30 | prefix= |
---|
31 | no_run= |
---|
32 | relocate= |
---|
33 | source= |
---|
34 | targets= |
---|
35 | version= |
---|
36 | log=build.txt |
---|
37 | |
---|
38 | while [ $# -gt 0 ]; |
---|
39 | do |
---|
40 | case $1 in |
---|
41 | -d) |
---|
42 | set -x |
---|
43 | debug="-d" |
---|
44 | ;; |
---|
45 | -h) |
---|
46 | shift |
---|
47 | hosts="-h $1" |
---|
48 | ;; |
---|
49 | -l) |
---|
50 | shift |
---|
51 | log=$1 |
---|
52 | ;; |
---|
53 | -n) |
---|
54 | no_run="-n" |
---|
55 | ;; |
---|
56 | -p) |
---|
57 | shift |
---|
58 | prefix="-p $1" |
---|
59 | ;; |
---|
60 | -r) |
---|
61 | shift |
---|
62 | relocation="-r $1" |
---|
63 | ;; |
---|
64 | -s) |
---|
65 | shift |
---|
66 | source="-s $1" |
---|
67 | ;; |
---|
68 | -t) |
---|
69 | shift |
---|
70 | targets="-t $1" |
---|
71 | ;; |
---|
72 | -v) |
---|
73 | shift |
---|
74 | version="-v $1" |
---|
75 | ;; |
---|
76 | --help) |
---|
77 | echo "$0 -dn -h <hosts> -p <prefix> -s <source> -t <targets> -v <version>" |
---|
78 | exit 2 |
---|
79 | ;; |
---|
80 | *) |
---|
81 | terminate "error: invalid option (try --help): $1" |
---|
82 | ;; |
---|
83 | esac |
---|
84 | shift |
---|
85 | done |
---|
86 | |
---|
87 | echo "$command_line" > $log |
---|
88 | |
---|
89 | scripts=$(dirname $0) |
---|
90 | |
---|
91 | echo "$scripts/build-rpms.sh -i $debug $no_run $prefix $source $targets $hosts $version" >> $log |
---|
92 | $scripts/build-rpms.sh -i $debug $no_run $prefix $source $targets $hosts $version 2>&1 | tee -a $log |
---|
93 | if [ ${PIPESTATUS[0]} -ne 0 ]; then |
---|
94 | terminate "Making the RPM files." |
---|
95 | fi |
---|
96 | |
---|
97 | echo "$scripts/build-exes.sh $debug $no_run $prefix $targets $relocation" >> $log |
---|
98 | $scripts/build-exes.sh $debug $no_run $prefix $targets $relocation 2>&1 | tee -a $log |
---|
99 | if [ ${PIPESTATUS[0]} -ne 0 ]; then |
---|
100 | terminate "Making the executable files." |
---|
101 | fi |
---|
102 | |
---|
103 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.