I spent a number of hours pondering how the other package maintainers create the list of files that goes into a package readme. The list is different than can be made easily with find because find lists directories by default (and the readmes I have seen do not list directories) and prepends "./" onto the file names. I finally made a quick command-line that generates this list. I figured it would be nice to add a command to the generic build script so that others don't have to ponder about how to create this list in the future.

I therefore added a command to the generic build script called "list" that lists the files in .inst in the desired format. This list can then be copied and pasted into the readme. Please see the attached patch.

I am sure that now I will be told "oh, there is a really easy way to do it and it goes like this...", but I figured I would at least send the patch for others to comment on.

Harold
--- generic-build-script.orig   2003-10-25 14:11:31.018936000 -0400
+++ generic-build-script        2003-10-25 14:12:38.816424000 -0400
@@ -141,6 +141,10 @@
   find . -name "*.exe" | xargs strip > /dev/null 2>&1
   true )
 }
+list() {
+  (cd ${instdir} && \
+  find . -name "*" ! -type d | sed 's/\.\/\(.*\)/\1/' )
+}
 pkg() {
   (cd ${instdir} && \
   tar cvjf ${bin_pkg} * )
@@ -173,6 +177,7 @@
   check)       check ; STATUS=$? ;;
   clean)       clean ; STATUS=$? ;;
   install)     install ; STATUS=$? ;;
+  list)                list ; STATUS=$? ;;
   strip)       strip ; STATUS=$? ;;
   package)     pkg ; STATUS=$? ;;
   pkg) pkg ; STATUS=$? ;;

Reply via email to