Give hints on files not included in Manifest.
authorwerner <werner>
Tue, 16 Dec 2003 17:52:19 +0000 (17:52 +0000)
committerwerner <werner>
Tue, 16 Dec 2003 17:52:19 +0000 (17:52 +0000)
ChangeLog
manifest-tool
manifest-tool.sig [new file with mode: 0644]

index 8a83bde..fb0bda6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-12-16  Werner Koch  <wk@gnupg.org>
+
+       * manifest-tool: Give hints on files not included in Manifest.
+
 2003-11-22  Werner Koch  <wk@gnupg.org>
 
        * addrutil.c (FinishRecord): For mode 0, escape quote colons.
index 1bc93f1..fad7573 100755 (executable)
@@ -24,6 +24,7 @@ mode=check
 manifest="Manifest"
 tmp_manifest=".#Manifest.$$"
 tmp_allnames=
+tmp_localnames=
 LC_ALL=C
 
 # Helper constants
@@ -182,7 +183,23 @@ function check_sig(file, fileprint, a,    command, pos, len, n, line, arr, any)
   }
 }
           ' $manifest  
-    exit $?
+    save_exit=$?
+
+    # Now check whether files are not included in the Manifest
+    tmp_allnames="/tmp/check-manifest-1.$$"
+    awk '/^[ \t]*(\#|$)/ {next}; $1 != "$names$" {print $1}' \
+        $manifest | sort > $tmp_allnames
+    tmp_localnames="/tmp/check-manifest-2.$$"
+    ls *.c *.h *am *.S 2>/dev/null | sort > $tmp_localnames
+    tmp=`comm -3 $tmp_allnames $tmp_localnames`
+    rm $tmp_allnames $tmp_localnames
+    tmp_allnames=
+    tmp_localnames=
+    if [ -n "$tmp" ]; then
+        echo "warning: files not included:" $tmp
+    fi
+
+    exit $save_exit
 }
 
 
@@ -248,6 +265,7 @@ cleanup ()
 {
     [ -f "$tmp_manifest" ] && rm "$tmp_manifest"
     [ -n "$tmp_allnames" -a -f "$tmp_allnames" ] && rm "$tmp_allnames"
+    [ -n "$tmp_localnames" -a -f "$tmp_localnames" ] && rm "$tmp_localnames"
 }
 
 trap cleanup EXIT SIGINT SIGHUP SIGPIPE
diff --git a/manifest-tool.sig b/manifest-tool.sig
new file mode 100644 (file)
index 0000000..c8fb0fb
Binary files /dev/null and b/manifest-tool.sig differ