blob: b6141fcf864e601cccbc9111a98222f1cd63cfcc (
plain)
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
112
113
114
115
116
117
118
119
120
121
122
|
LANG=C
LC_ALL=C
export LANG LC_ALL
PATH=`pwd`/bin:$PATH
export PATH
set -e
set -o pipefail
SH="bash"
unset MAKELEVEL MAKEFLAGS
export MAKELEVEL MAKEFLAGS
code=0
# we want to test local commits
real_repo=../../..
# but final html should have fixed public url
show_repo=git://github.com/libusual/libusual.git
usual_clone() {
enter_code
echo "$ git clone $show_repo" "$@"
git clone $real_repo "$@"
}
test_start() {
rm -rf tmp
mkdir tmp
cd tmp
}
enter_code() {
if test "$code" = "0"; then
echo "---------------------------------"
code=1
fi
}
leave_code() {
if test "$code" = "1"; then
echo "---------------------------------"
code=0
fi
}
ls() {
/bin/ls -C "$@"
}
title() {
leave_code
echo ""
echo "=" "$@" "="
echo ""
}
title2() {
leave_code
echo ""
echo "==" "$@" "=="
echo ""
}
title3() {
leave_code
echo ""
echo "===" "$@" "==="
echo ""
}
run() {
enter_code
echo "$ $*"
case "$1" in
cd|ls|export) $* ;;
*) $SH -c "$*" 2>&1
esac
}
runq() {
enter_code
echo "$ $*"
echo "[...]"
$SH -c "$*" > quiet.log 2>&1 || { tail -5 quiet.log; exit 1; }
rm -f quiet.log
}
msg() {
leave_code
echo ""
echo "$@"
echo ""
}
longmsg() {
leave_code
echo ""
sed 's/^ //'
echo ""
}
cat_file() {
leave_code
mkdir -p `dirname $1`
echo ".File: $1"
case "$1" in
*Makefile) echo "[source,makefile]" ;;
*.[ch]) echo "[source,c]" ;;
*.ac) echo "[source,autoconf]" ;;
*.sh) echo "[source,shell]" ;;
esac
echo "-----------------------------------"
sed 's/^ //' > $1
cat $1
echo "-----------------------------------"
}
|