Source files of fsfe.org, pdfreaders.org, freeyourandroid.org, ilovefs.org, drm.info, and test.fsfe.org. Contribute: https://fsfe.org/contribute/web/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.sh.test.patch 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. --- build.sh 2011-09-25 22:43:17.000000000 +0200
  2. +++ build-test.sh 2011-09-25 22:43:35.000000000 +0200
  3. @@ -2,18 +2,18 @@
  4. # -----------------------------------------------------------------------------
  5. # Web page build script
  6. # -----------------------------------------------------------------------------
  7. -# This script is called every 5 minutes on www.fsfe.org to rebuild the
  8. +# This script is called every 5 minutes on test.fsfe.org to rebuild the
  9. # HTML pages from the .xhtml, .xml and .xsl source files. Most of the work,
  10. -# however, is done by the Perl script build.pl.
  11. +# however, is done by the Perl script build-test.pl.
  12. # -----------------------------------------------------------------------------
  13. -SOURCE=/home/www/fsfe
  14. -DEST=/home/www/html
  15. -TMP=/home/www/tmp.$$
  16. -STATUS=/var/www/web
  17. +SOURCE=/home/www/fsfe-test
  18. +DEST=/home/www/html-test
  19. +TMP=/home/www/tmp-test.$$
  20. +STATUS=/var/www/web-test
  21. MAKEFILE_PL=${SOURCE}/Makefile.PL
  22. -SVNUPOUTFILE=/tmp/fsfe-svnup-out
  23. -SVNUPERRFILE=/tmp/fsfe-svnup-err
  24. +SVNUPOUTFILE=/tmp/fsfe-test-svnup-out
  25. +SVNUPERRFILE=/tmp/fsfe-test-svnup-err
  26. # Since we must grep for svn output messages,
  27. # let's ensure we get English messages
  28. @@ -22,21 +22,21 @@
  29. # Redirect output
  30. exec 1> ${STATUS}/status.txt 2>&1
  31. -# If there is a build.pl script started more than 10 minutes ago, kill it and mail alarm
  32. -BUILD_STARTED=$(ps --no-headers -C build.pl -o etime | cut -c 7-8 | sort -r | head -n 1)
  33. +# If there is a build-test.pl script started more than 10 minutes ago, kill it and mail alarm
  34. +BUILD_STARTED=$(ps --no-headers -C build-test.pl -o etime | cut -c 7-8 | sort -r | head -n 1)
  35. if [[ -n "$BUILD_STARTED" && "10#${BUILD_STARTED}" -gt 10 ]] ; then
  36. echo -e "
  37. - A build.pl script has been running for more than 10 minutes,
  38. + A build-test.pl script has been running for more than 10 minutes,
  39. and was automatically killed.
  40. -
  41. - Please check the build script log at http://status.fsfe.org/web/
  42. +
  43. + Please check the build script log at http://status.fsfe.org/web-test/
  44. and fix the cause of the problem.
  45. -
  46. +
  47. In case of doubt, please write to system-hackers@fsfeurope.org
  48. - " | mail -s "www.fsfe.org: build.pl warning" web@fsfeurope.org system-hackers@fsfeurope.org
  49. - killall build.pl
  50. - echo "$(date) A build.pl script has been running for more than 10 minutes, and was automatically killed."
  51. + " | mail -s "test.fsfe.org: build-test.pl warning" web@fsfeurope.org system-hackers@fsfeurope.org
  52. + killall build-test.pl
  53. + echo "$(date) A build-test.pl script has been running for more than 10 minutes, and was automatically killed."
  54. exit
  55. fi
  56. @@ -55,7 +55,7 @@
  57. rm -rf ${TMP%.*}.*
  58. # -----------------------------------------------------------------------------
  59. -echo "$(date) Updating source files from SVN."
  60. +echo "$(date) Updating source files from SVN test branch."
  61. # -----------------------------------------------------------------------------
  62. # Update the svn working copy and check if any files were updated.
  63. @@ -88,7 +88,7 @@
  64. if test ! -s ${SVNUPOUTFILE} \
  65. -a "$(date -r ${STATUS}/last-run +%F)" == "$(date +%F)" \
  66. -a "$1" != "-f" ; then
  67. - echo "$(date) No changes to SVN."
  68. + echo "$(date) No changes to SVN test branch."
  69. echo "$(date) $(svn info 2>/dev/null | grep '^Revision')"
  70. # In this case we only append to the cumulative status-log.txt file, we don't touch status-finished.txt
  71. cat ${STATUS}/status.txt >> ${STATUS}/status-log.txt
  72. @@ -101,10 +101,10 @@
  73. perl ${MAKEFILE_PL}
  74. -# Make sure build.sh and build.pl are executable
  75. +# Make sure build-test.sh and build-test.pl are executable
  76. # TODO: this can be removed once we set the "executable" svn property
  77. # to these files
  78. -chmod +x tools/build.sh tools/build.pl
  79. +chmod +x tools/build-test.sh tools/build-test.pl
  80. chmod +x cgi-bin/weborder.pl cgi-bin/stacs-register-capacity.pl
  81. chmod +x cgi-bin/stacs-register-workshop.pl
  82. @@ -125,9 +125,9 @@
  83. touch ${STATUS}/last-run
  84. if test "x`hostname`" = "xekeberg"; then
  85. - tools/build.pl -t 4 -q -o ${TMP} -i .
  86. + tools/build-test.pl -t 4 -q -o ${TMP} -i .
  87. else
  88. - tools/build.pl -q -o ${TMP} -i .
  89. + tools/build-test.pl -q -o ${TMP} -i .
  90. fi
  91. if test $? -ne 0; then
  92. @@ -162,7 +162,7 @@
  93. echo "$(date) Generating robots.txt."
  94. # -----------------------------------------------------------------------------
  95. -echo -e "User-agent: *\nDisallow: /source/" > ${TMP}/global/robots.txt
  96. +echo -e "User-agent: *\nDisallow: /" > ${TMP}/global/robots.txt
  97. # -----------------------------------------------------------------------------
  98. echo "$(date) Activating new output."
  99. @@ -176,7 +176,7 @@
  100. echo "$(date) Generating translation logs."
  101. # -----------------------------------------------------------------------------
  102. -tools/translation-log.sh ${DEST}/translations.log ${STATUS}
  103. +tools/translation-log-test.sh ${DEST}/translations.log ${STATUS}
  104. # -----------------------------------------------------------------------------
  105. echo "$(date) Build complete."
  106. @@ -184,6 +184,5 @@
  107. cp ${STATUS}/status.txt ${STATUS}/status-finished.txt
  108. cat ${STATUS}/status-finished.txt >> ${STATUS}/status-log.txt
  109. -cp tools/status.php ${STATUS}/index.php
  110. -cp tools/qa/reports/* ${STATUS}/qa/reports/
  111. +cp tools/status-test.php ${STATUS}/index.php