... |
... |
@@ -88,13 +88,7 @@ mkdir -p "${arg_workdir}/export" |
88
|
88
|
|
89
|
89
|
arg_workdir="$(cd ${arg_workdir} && pwd)"
|
90
|
90
|
|
91
|
|
-# Ensure the build schedule for either unconditional
|
92
|
|
-# or continuous builds.
|
93
|
|
-#
|
94
|
|
-# $1 - "continuous" or "unconditional"
|
95
|
|
-#
|
96
|
|
-function ensureBuildSchedule () {
|
97
|
|
- local job=
|
|
91
|
+function generateLaunchers () {
|
98
|
92
|
local scriptname=
|
99
|
93
|
|
100
|
94
|
# Create the multistrap.conf with our preferred mirror
|
... |
... |
@@ -108,7 +102,6 @@ function ensureBuildSchedule () { |
108
|
102
|
#
|
109
|
103
|
for arch in i386 amd64 armhf arm64; do
|
110
|
104
|
scriptname="launcher-${arch}.sh"
|
111
|
|
- job="${arg_schedule} ${topdir}/${scriptname}"
|
112
|
105
|
|
113
|
106
|
sed -e "s|@@WORKDIR@@|${arg_workdir}|g" \
|
114
|
107
|
-e "s|@@TOPDIR@@|${topdir}|g" \
|
... |
... |
@@ -129,6 +122,21 @@ function ensureBuildSchedule () { |
129
|
122
|
-i ${topdir}/${scriptname}
|
130
|
123
|
|
131
|
124
|
chmod +x ${topdir}/${scriptname}
|
|
125
|
+ done
|
|
126
|
+}
|
|
127
|
+
|
|
128
|
+# Ensure the build schedule for either unconditional
|
|
129
|
+# or continuous builds.
|
|
130
|
+#
|
|
131
|
+# $1 - "continuous" or "unconditional"
|
|
132
|
+#
|
|
133
|
+function ensureBuildSchedule () {
|
|
134
|
+ local scriptname=
|
|
135
|
+ local job=
|
|
136
|
+
|
|
137
|
+ for arch in i386 amd64 armhf arm64; do
|
|
138
|
+ scriptname="launcher-${arch}.sh"
|
|
139
|
+ job="${arg_schedule} ${topdir}/${scriptname}"
|
132
|
140
|
|
133
|
141
|
# Register the job with user's crontab
|
134
|
142
|
cat <(fgrep -i -v "${scriptname}" <(crontab -l)) <(echo "$job") | crontab -
|
... |
... |
@@ -164,6 +172,8 @@ function configureApache () { |
164
|
172
|
# Main
|
165
|
173
|
#
|
166
|
174
|
|
|
175
|
+generateLaunchers
|
|
176
|
+
|
167
|
177
|
# Schedule or change schedule of the nightlies
|
168
|
178
|
if [ ! -z "${arg_schedule}" ]; then
|
169
|
179
|
ensureBuildSchedule
|