Changeset 43ddb7a
- Timestamp:
- Oct 2, 2010, 10:24:17 PM (14 years ago)
- Branches:
- master, debian, mac, no-cups
- Children:
- e83b2d7
- Parents:
- ca8acb7
- git-author:
- Jessica B. Hamrick <jhamrick@…> (10/02/10 22:24:17)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (10/02/10 22:24:17)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
client/bin/gbr
rca8acb7 r43ddb7a 22 22 -s, --shuffle Randomize the order that the songs are queued in 23 23 -r, --recursive Recursively find files if a directory is passed in 24 -n, --number NUMBER Only print NUMBER files, if more than NUMBER are given 25 (this will print the first NUMBER files if -s is not given) 24 26 -h, --help Print this message 25 27 USAGE … … 31 33 my $shuffle = 0; 32 34 my $recursive = 0; 35 my $number = 0; 33 36 34 37 # parse the options … … 37 40 'h|help' => \$help, 38 41 's|shuffle' => \$shuffle, 39 'r|recursive' => \$recursive); 42 'r|recursive' => \$recursive, 43 'n|number=i' => \$number); 40 44 41 45 # if the -h flag was passed, then print the usage and exit … … 77 81 if ($shuffle) { 78 82 @files = shuffle(@files); 83 } 84 85 # if the number flag was specified, then only play the specified 86 # number of files 87 if ($number > 0 and $number < $#files) { 88 @files = @files[0 .. $number-1] 79 89 } 80 90
Note: See TracChangeset
for help on using the changeset viewer.