-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRUNME
executable file
·111 lines (93 loc) · 3.47 KB
/
RUNME
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
110
111
#!/bin/sh
#
# Copyright (C) 2014 Neil McGill
#
# This game is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This game is distributed in the hope that it will be fun,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this game; if not, write to the Free
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
cat <<%%
.d8888b. 888 d8b 888
d88P Y88b 888 Y8P 888
888 888 888 888
888 .d88b. 888d888 888 888 88888b. 888 888 .d8888b 88888b.
888 88888 d88""88b 888P" 888 888 888 "88b 888 888 d88P" 888 "88b
888 888 888 888 888 888 888 888 888 888 888 888 888 888
Y88b d88P Y88..88P 888 Y88b 888 888 888 888 888 Y88b. 888 888
"Y8888P88 "Y88P" 888 "Y88888 888 888 888 888 "Y8888P 888 888
888
Y8b d88P
"Y88P"
%%
. ./scripts/common.sh
LOG=./build.log
tech_support()
{
#
# Record some useful to send back home on fail if we are permitted
#
(
echo
echo system install details
echo ===================================================
date
(apt --installed list | grep -i SDL) 2>/dev/null
(apt --installed list | grep gcc) 2>/dev/null
(apt --installed list | grep clang) 2>/dev/null
echo
echo compilers
echo ===================================================
clang --version 2>/dev/null
gcc --version 2>/dev/null
uname -a
) >> $LOG 2>&1
}
run() {
ARGS=$1
STDOUT=$2
EXIT_CODE=.exit_code.$$
($1 2>&1; echo $? > $EXIT_CODE) | tee $STDOUT
MY_RET=`cat $EXIT_CODE`
return $MY_RET
}
run ./.RUNME $LOG
if [ $? -ne 0 ]; then
log_err "Sorry for the screwup!"
log_err "Enter 'y' if I can send $LOG to $MAINTAINER (who will be soundly whipped)?"
read ans
if [ "$ans" = "y" ]; then
tech_support
cat $LOG | mail -s "gorynlich build failed" $MAINTAINER
if [ $? -ne 0 ]; then
log_err "Rats. That failed too!"
log_err "Ok. If you could send file $LOG manually to $MAINTAINER, would be appreciated."
fi
else
log_err "Ok. If you could send file $LOG manually to $MAINTAINER, would be appreciated."
log_err "Sorry for the screwup!"
fi
log "Thanks"
else
if [ ! -f .built ]; then
touch .built
log "Built successfully. Would you mind if I send this build log to the $MAINTAINER"
log "so I can keep track of what gcc version works? If not, no problem."
log "Enter 'y' if this is ok"
read ans
if [ "$ans" = "y" ]; then
tech_support
cat $LOG | mail -s "gorynlich build passed" $MAINTAINER
fi
fi
fi