emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 23fc4793001 1/2: ; Fix admin/upload-manuals script


From: Eli Zaretskii
Subject: emacs-29 23fc4793001 1/2: ; Fix admin/upload-manuals script
Date: Sun, 30 Jul 2023 12:20:07 -0400 (EDT)

branch: emacs-29
commit 23fc4793001e4de920bb8dae280133f4467a7797
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; Fix admin/upload-manuals script
    
    * admin/upload-manuals (html_mono): Chdir to the right directory
    before committing.
    (html_node): Avoid computing $stale in newly-created or empty
    directories.
---
 admin/upload-manuals | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/admin/upload-manuals b/admin/upload-manuals
index 6f44456efb8..a206177a5c1 100755
--- a/admin/upload-manuals
+++ b/admin/upload-manuals
@@ -305,13 +305,14 @@ done
 ## TODO: check for removed manuals.
 
 [ "$clist" ] && (
-    cd $webdir/manual/html_mono
+    cd $webdir/manual
     [ "$new" ] && {
         echo "Adding new files: $new"
         $cvs add $new || die "add error"
         new_manual $new || die
         echo "Remember to add new entries to manual/index.html"
     }
+    cd html_mono
     $cvs commit -m "$message" $clist || die "commit error"
 )
 
@@ -339,9 +340,13 @@ for d in html_node/*; do
     done
 
     stale=
-    for f in $webdir/manual/$d/*.html; do
-        [ -e ${f#$webdir/manual/} ] || stale="$stale ${f##*/}"
-    done
+    # Newly created directory will have no HTML files, so none can be
+    # "stale".  But 'for' returns the original wildcard, so avoid that.
+    ls $webdir/manual/$d/*.html > /dev/null 2>&1 && {
+       for f in $webdir/manual/$d/*.html; do
+            [ -e ${f#$webdir/manual/} ] || stale="$stale ${f##*/}"
+       done
+    }
 
     mv $d/*.html $webdir/manual/$d/
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]