don't display the ._cfg???? files anymore but instead the number of updates for each...
authorSimon Stelling <blubb@gentoo.org>
Thu, 13 Apr 2006 16:19:04 +0000 (16:19 -0000)
committerSimon Stelling <blubb@gentoo.org>
Thu, 13 Apr 2006 16:19:04 +0000 (16:19 -0000)
svn path=/main/trunk/; revision=3138

bin/etc-update

index d2946c3a001362278a4cf2d6f782b9234e020cf1..885d513a7a13785bec5bad60fcb9b3be3e65c6e3 100755 (executable)
@@ -110,18 +110,10 @@ function sel_file() {
                                isfirst=${file}
                        fi
                        numshow=$(printf "%${numwidth}i${PAR} " ${file})
-                       spacer=${numshow//?/ }
+                       numupdates=$(( $(wc -l <${TMP}/files/${file}) - 1 ))
                        echo -n "${numshow}"
                        if (( ${mode} == 0 )); then
-                               spacedit=0
-                               for word in $(<${TMP}/files/${file}); do
-                                       if (( ${spacedit} == 1 )); then
-                                               echo -n "${spacer}"
-                                       else
-                                               spacedit=1
-                                       fi
-                                       echo ${word}
-                               done
+                               echo "$(head -n1 ${TMP}/files/${file}) (${numupdates})"
                        else
                                head -n1 ${TMP}/files/${file}
                        fi