Index: palm/trunk/SCRIPTS/document_changes
===================================================================
--- palm/trunk/SCRIPTS/document_changes	(revision 1805)
+++ palm/trunk/SCRIPTS/document_changes	(revision 1810)
@@ -20,5 +20,5 @@
 # Current revisions:
 # -----------------
-# 
+# document_changes now checks all subdirectories. Modified printing to screen.
 # 
 # Former revisions:
@@ -38,9 +38,9 @@
 #
 # Usage:
-# a) go to the source directory (e.g. current_version/trunk/SOURCE and 
-#    perform "document_changes",
+# a) go to the source directory (e.g. current_version/trunk and perform:
+#    "document_changes",
 # b) or call "document_changes" directly and add the path to the source code as
 #    argument
-#    (e.g. document_changes current_version/trunk/SOURCE)
+#    (e.g. document_changes trunk)
 #
 # Note:
@@ -56,5 +56,5 @@
     count_changes=0     #: count the number of files with CR text
     count_files=0       #: count the number of files
-    filename=""         #: current file name to be scanned
+    fn=""               #: current file name to be scanned
     file_firstchar=""   #: first character of filename
     file_lastchar=""    #: last character of filename
@@ -66,5 +66,5 @@
     line_count=0        #: counter to the line no. of the file
     line_start=9999999  #: line no. where CR text starts
-    line_stop=0         #: line no. where Cr text ends
+    line_stop=0         #: line no. where CR text ends
     line_tmp=""         #: first 19 characters of line
     list_delete=""      #: contains the line no. that must be deleted from CR
@@ -78,18 +78,28 @@
        input_dir=`pwd`
     fi
-    printf "\n  *** Checking files in $input_dir\n"
-
-    for filename in $input_dir/*; do
+    
+    printf "\n"
+    printf "#------------------------------------------------------------------------# \n"
+    printf "| \e[1mdocument_changes\e[0m                                                       | \n"
+    printf "|                                                                        | \n"
+    printf "| This tool moves the change comments in the all PALM file headers from  | \n"
+    printf "| 'Current revisions' to 'Former revisions' and saves the time stamp.    | \n"  
+    printf "#------------------------------------------------------------------------# \n"
+    
+    printf "\n  *** Checking files in $input_dir and all recursive subdirectories...\n"
+
+    IFS=$'\n';
+    for fn in $(find $input_dir -not -name '*.pdf' -and -not -name '*.x' -and -not -name '*.eps' -and -not -name '*.png' -and -not -name '*.svn*'); do
 
 #
 #--    exclude backup and invisible files
-       file_firstchar=${filename:0:1}
-       file_lastchar=`echo -n $filename| tail -c -1`
-       file_extension=${filename##*.}
+       file_firstchar=${fn:0:1}
+       file_lastchar=`echo -n $fn| tail -c -1`
+       file_extension=${fn##*.}
        if [[ "$file_firstchar" == "." || "$file_extension" == "x" || "$file_lastchar" == "~" || "$file_extension" == "tar" ]]
        then
           continue
        fi
-
+       
        (( count_files = count_files + 1 ))
 
@@ -135,7 +145,11 @@
              if [[ $line_count -eq $line_start && "$line_no_space" != "" ]]
              then
-                printf "\n  *** Revisions found in $filename\n"
+
+             
+                printf "\r%$(tput cols)s" " "   
+                printf "\r  \e[1;92m*** Comments found in $fn\e[0m\n"
+             
                 found_comment=true
-                cp $filename $filename~
+                cp $fn $fn~
              fi
 
@@ -148,5 +162,5 @@
              fi
           fi
-
+          
 #
 #--       get the timestamp from the current revision
@@ -157,6 +171,9 @@
           fi
 
-       done <"$filename"
-
+       done <"$fn"
+
+       printf "\r%$(tput cols)s" " "   
+       printf "\r\e[1m  *** Searched files: $count_files. Comments found: $count_changes\e[0m."
+       
 #
 #--    move comments from current revisions to former revisions
@@ -169,12 +186,12 @@
 #--       insert comments to Former Revisions
           (( line_stop = line_stop + 4 ))
-          sed -i "${line_stop}i$comments" $filename
+          sed -i "${line_stop}i$comments" $fn
 
 #
 #--       delete comments from current revisions and insert two blank lines
           list_delete=${list_delete#?}
-          sed -i "$list_delete" $filename
-          sed -i "${line_start}i${comment_char} " $filename
-          sed -i "${line_start}i${comment_char} " $filename
+          sed -i "$list_delete" $fn
+          sed -i "${line_start}i${comment_char} " $fn
+          sed -i "${line_start}i${comment_char} " $fn
 
        fi
@@ -184,16 +201,13 @@
 #
 #-- inform the user about the changes
+    printf "\r%$(tput cols)s" " "
+    printf "\r\e[1m  *** Searched files: $count_files. Comments found: $count_changes\e[0m. - \e[1;32mfinished.\e[0m\n\n"
+
     if  [[ $count_changes -gt 0 ]]
     then
-       printf "\n  *** $count_files documents checked.\n"
-       printf "  *** $count_changes changed documents found.\n"
-       printf "\n"
-       printf "  *** All files in $input_dir were checked.\n"     
-       printf "  *** You can now proceed with checking other directories\n"
-       printf "      - or you might want to perform svn commit -m 'last commit documented' trunk\n"
-       printf "\n"      
-       printf "  *** Please do not forget to commit your changes in the changelog \n under https://palm.muk.uni-hannover.de/trac/wiki/doc/tec/changelog !"      
+       printf "  *** You can now proceed with\n      \e[0;91msvn commit -m 'last commit documented' trunk\e[0m\n"
+       printf "  *** Please do not forget to commit your changes in the changelog at\n      \e[0;91mhttps://palm.muk.uni-hannover.de/trac/wiki/doc/tec/changelog\e[0m!\n"    
     else
-       printf "\n  *** $count_files documents checked.\n"
-       printf "  *** No documented modifications found.\n"
+        printf "  *** No comments found in files!\n"   
+    
     fi
