Last change
on this file since 4885 was
4558,
checked in by bensch, 19 years ago
|
orxonox/trunk: PhysicsEngine looks better (it speeds up things… but i do not exactly know if it works
|
-
Property svn:executable set to
*
|
File size:
2.2 KB
|
Rev | Line | |
---|
[4103] | 1 | #!/usr/bin/perl |
---|
[4558] | 2 | ########################################################################## |
---|
| 3 | # orxonox - the future of 3D-vertical-scrollers # |
---|
| 4 | # # |
---|
| 5 | # Copyright (C) 2004 orx # |
---|
| 6 | # # |
---|
[4103] | 7 | # This program is free software; you can redistribute it and/or modify # |
---|
| 8 | # it under the terms of the GNU General Public License as published by # |
---|
| 9 | # the Free Software Foundation; either version 2, or (at your option) # |
---|
[4558] | 10 | # any later version. # |
---|
| 11 | # # |
---|
| 12 | # ### File Specific: # |
---|
| 13 | # main-programmer: Benjamin Grauer # |
---|
| 14 | # co-programmer: ... # |
---|
| 15 | # # |
---|
[4103] | 16 | # This is a simple perl script, that generates a List of all files # |
---|
| 17 | # contained in a Folder checked out with SVN and writes into an output # |
---|
| 18 | # file. # |
---|
| 19 | ########################################################################## |
---|
| 20 | |
---|
| 21 | if (@ARGV[0] eq "-h" || $ARGV[0] eq "--help" || @ARGV != 2) |
---|
| 22 | { |
---|
| 23 | die ("usage: data.genlist.pl <data-directory> <output-file>\n"); |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | if (! -d @ARGV[0]) |
---|
| 28 | { |
---|
| 29 | die ("@ARGV[0] is not regular Directory.\n"); |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | open(FD, "> @ARGV[1]") or die("Couldn't open @ARGV[1]\n") ; |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | &createFileList(@ARGV[0]); |
---|
| 36 | |
---|
| 37 | close(FD); |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | sub createFileList |
---|
| 41 | { |
---|
| 42 | my ($folderName) = @_; |
---|
| 43 | my ($fullName); |
---|
| 44 | my ($inputFile); |
---|
| 45 | my ($printFile); |
---|
| 46 | my (@folderList); |
---|
| 47 | |
---|
| 48 | open(FOLDERLIST, "ls $folderName -1 |"); |
---|
| 49 | @folderList = <FOLDERLIST>; |
---|
| 50 | |
---|
| 51 | foreach $inputFile (@folderList) |
---|
| 52 | { |
---|
| 53 | if ($inputFile eq "." || $inputFile eq "..") |
---|
[4558] | 54 | { |
---|
[4103] | 55 | |
---|
[4558] | 56 | } |
---|
[4103] | 57 | chomp($inputFile); |
---|
| 58 | $fullName = "$folderName/$inputFile"; |
---|
| 59 | |
---|
| 60 | $printFile = $fullName; |
---|
| 61 | $printFile =~ s/@ARGV[0]//; |
---|
| 62 | print FD "$printFile\n"; |
---|
| 63 | if (-d $fullName ) |
---|
[4558] | 64 | { |
---|
| 65 | &createFileList($fullName); |
---|
| 66 | } |
---|
[4103] | 67 | } |
---|
| 68 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.