about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Functions/Misc/zrecompile21
2 files changed, 16 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 350161ff8..5b904cc53 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-05-02  Sven Wischnowsky  <wischnow@informatik.hu-berlin.de>
 
+	* 11061: Functions/Misc/zrecompile: make zrecompile detect deleted
+ 	and new files
+	
 	* 11060: Doc/Zsh/compsys.yo: two more doc fixes
 	
 2000-05-02  Peter Stephenson  <pws@cambridgesiliconradio.com>
diff --git a/Functions/Misc/zrecompile b/Functions/Misc/zrecompile
index 88d976f5b..c2aa2a4e3 100644
--- a/Functions/Misc/zrecompile
+++ b/Functions/Misc/zrecompile
@@ -53,7 +53,7 @@ else
 fi
 
 if [[ -n $pats ]]; then
-  local end
+  local end num
 
   while (( $# )); do
     end=$argv[(i)--]
@@ -84,13 +84,18 @@ if [[ -n $pats ]]; then
     (( $#files )) || files=( ${zwc%.zwc} )
 
     if [[ -f $zwc ]]; then
-      re=
-      for file in $files; do
-        if [[ $file -nt $zwc ]]; then
-          re=yes
-	  break
-        fi
-      done
+      num=$(zcompile -t $zwc | wc -l)
+      if [[ num-1 -ne $#files ]]; then
+        re=yes
+      else
+        re=
+        for file in $files; do
+          if [[ $file -nt $zwc ]]; then
+            re=yes
+	    break
+          fi
+        done
+      fi
     else
       re=yes
     fi