]> git.cworth.org Git - sup/commitdiff
make sup-files.rb print out all files when executed
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Sun, 26 Apr 2009 14:28:16 +0000 (10:28 -0400)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Sun, 26 Apr 2009 14:28:16 +0000 (10:28 -0400)
This makes it easy to do something like:
  vi `ruby ./sup-files.rb`
to edit all files.

sup-files.rb

index 71562f59b191a495e85d1a1bae51b24bf510f405..6acf7c0de6a001a2546161d9b8e0d9bec2396c36 100644 (file)
@@ -5,3 +5,7 @@ SUP_FILES =
   SUP_EXTRA_FILES +
   SUP_EXECUTABLES.map { |f| "bin/#{f}" } +
   SUP_LIB_DIRS.map { |d| Dir["#{d}/*.rb"] }.flatten
+
+if $0 == __FILE__ # if executed from commandline
+  puts SUP_FILES
+end