summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Nelson <unixabg@gmail.com>2012-01-16 19:22:47 -0600
committerRichard Nelson <unixabg@gmail.com>2012-01-16 19:22:47 -0600
commitd33c099ede8d64d9a7d72a26930ac109450e7504 (patch)
tree0db1ad34adcb7b385ddc8a79ccffc48b413b571b
parentfe93b0157199a93784478369b0123afae51d4bf3 (diff)
downloadvyos-live-build-d33c099ede8d64d9a7d72a26930ac109450e7504.tar.gz
vyos-live-build-d33c099ede8d64d9a7d72a26930ac109450e7504.zip
l-b.cgi - Add pending build(s) to be processed ahead of your request.
-rwxr-xr-xcgi/live-build-cgi4
-rw-r--r--templates/cgi/debian-official/build.html2
-rw-r--r--templates/cgi/debian-unofficial/build.html2
3 files changed, 6 insertions, 2 deletions
diff --git a/cgi/live-build-cgi b/cgi/live-build-cgi
index 655418a79..6e8f8b607 100755
--- a/cgi/live-build-cgi
+++ b/cgi/live-build-cgi
@@ -118,11 +118,15 @@ else
# Getting build identifier
_BUILD=$(date +%Y%m%d.%H%M%S.%N)
+ # Getting number of builds pending.
+ _QUEUENUM=$(ls "${_TEMPDIR}"/*.build | wc -l)
+
#echo "${QUERY_STRING}"
# Sending html confirmation
# Note: On each string remember to use a delimeter that is not in the string.
sed -e "s/BUILD/${_BUILD}/g" \
-e "s/EMAIL/${_EMAIL}/" \
+ -e "s/QUEUENUM/${_QUEUENUM}/" \
-e "s/LB_BINARY_IMAGES/${LB_BINARY_IMAGES}/" \
-e "s/LB_DISTRIBUTION/${LB_DISTRIBUTION}/" \
-e "s/LB_PACKAGE_LISTS/${LB_PACKAGE_LISTS}/" \
diff --git a/templates/cgi/debian-official/build.html b/templates/cgi/debian-official/build.html
index b7b1e6e61..2ceebeabb 100644
--- a/templates/cgi/debian-official/build.html
+++ b/templates/cgi/debian-official/build.html
@@ -1,6 +1,6 @@
<br />
-<h3>Your build 'BUILD' was recorded and will be processed soon. Depending on the options you have selected, the build takes about between 5 and 20 minutes. You will be notified by email when the attempt has completed.</h3>
+<h3>Your build 'BUILD' was recorded and will be processed soon. Depending on the options you have selected, a build attempt generally takes between 5 and 20 minutes to complete. Currently there are 'QUEUENUM' pending build(s) to be processed ahead of your request. You will be notified by email when the attempt has completed.</h3>
<h3>Your build will be available at: <a href="SERVER/BUILD/">SERVER/BUILD/</a>.</h3>
diff --git a/templates/cgi/debian-unofficial/build.html b/templates/cgi/debian-unofficial/build.html
index 3ff461a1b..64f06cb17 100644
--- a/templates/cgi/debian-unofficial/build.html
+++ b/templates/cgi/debian-unofficial/build.html
@@ -1,6 +1,6 @@
<br />
-<h3>Your build 'BUILD' was recorded and will be processed soon. Depending on the options you have selected, the build takes about between 5 and 20 minutes. You will be notified by email when the attempt has completed.</h3>
+<h3>Your build 'BUILD' was recorded and will be processed soon. Depending on the options you have selected, a build attempt generally takes between 5 and 20 minutes to complete. Currently there are 'QUEUENUM' pending build(s) to be processed ahead of your request. You will be notified by email when the attempt has completed.</h3>
<h3>Your build will be available at: <a href="SERVER/BUILD/">SERVER/BUILD/</a>.</h3>