diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-10-31 10:37:01 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-10-31 10:37:01 +0100 |
commit | 057a182115826492a04cfa1e637764cf4dc3c8d3 (patch) | |
tree | a371417b4e737f186e87b19af2b75db9c60b18a7 | |
parent | 8ed80d18b658ba69f88f641651c07b14c90174df (diff) | |
download | jenkins.debian.net-057a182115826492a04cfa1e637764cf4dc3c8d3.tar.xz |
reproducible-notes: update pkgs with notes properly
-rwxr-xr-x | bin/reproducible_html_notes.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bin/reproducible_html_notes.sh b/bin/reproducible_html_notes.sh index 40fc1039..db5c0aeb 100755 --- a/bin/reproducible_html_notes.sh +++ b/bin/reproducible_html_notes.sh @@ -190,6 +190,7 @@ write_issues() { touch $ISSUES_PATH/stamp for ISSUE in ${ISSUES} ; do PAGE=$ISSUES_PATH/${ISSUE}_issue.html + echo "Updating ${ISSUE}_issue.html" create_issue $ISSUE done cd $ISSUES_PATH @@ -197,6 +198,7 @@ write_issues() { # if issue is older than stamp file... if [ $FILE -ot stamp ] ; then rm $FILE + echo "Deleting $FILE" fi done rm stamp @@ -230,22 +232,29 @@ write_notes() { PAGE=$NOTES_PATH/${PKG}_note.html create_pkg_note $PKG done + echo # cleanup old notes and re-create package page if needed cd $NOTES_PATH for FILE in *.html ; do PKG_FILE=/var/lib/jenkins/userContent/rb-pkg/${FILE:0:-10}.html + PKG=${FILE:0:-10} + echo -n "Checking ${PKG_FILE} for ${PKG} - " # if note was removed... if [ $FILE -ot stamp ] ; then + echo "old note found, removing and updating the package page." # cleanup old notes rm $FILE # force re-creation of package file if there was a note rm -f ${PKG_FILE} - process_packages ${FILE:0-10} + process_packages ${PKG} else # ... else re-recreate ${PKG_FILE} if it does not contain a link to the note already if ! grep _note.html ${PKG_FILE} > /dev/null 2>&1 ; then + echo "note not mentioned in package page, updating it." rm -f ${PKG_FILE} - process_packages ${FILE:0-10} + process_packages ${PKG} + else + echo "ok." fi fi done |