Compare commits
2 Commits
00266516fe
...
397f9369d6
Author | SHA1 | Date | |
---|---|---|---|
397f9369d6 | |||
d8a0d1e3d8 |
@ -6,12 +6,12 @@ trim_trailing_whitespace=true
|
||||
insert_final_newline=true
|
||||
[{Makefile,*.s[ac]ss}]
|
||||
indent_style=tab
|
||||
indent_size=1
|
||||
indent_size=4
|
||||
[{ignore.txt,*.csv,m4/*}]
|
||||
insert_final_newline=false
|
||||
[*.rb]
|
||||
indent_style=space
|
||||
indent_size=2
|
||||
indent_style=tab
|
||||
indent_size=4
|
||||
[*.sh]
|
||||
indent_style=tab
|
||||
indent_size=1
|
||||
indent_size=4
|
||||
|
76
pfiles.rb
76
pfiles.rb
@ -4,53 +4,53 @@
|
||||
require 'find'
|
||||
ignore=!File.file?('dat/ignore.txt') ? [] : File.readlines('dat/ignore.txt')
|
||||
if ignore != []
|
||||
ignore.map! do |i|
|
||||
"in/#{i}"
|
||||
end
|
||||
ignore.map! do |i|
|
||||
"in/#{i}"
|
||||
end
|
||||
end
|
||||
class Enumerator
|
||||
def collect
|
||||
out=Array.new
|
||||
for i in self
|
||||
out.push(i)
|
||||
end
|
||||
return out
|
||||
end
|
||||
def collect
|
||||
out=Array.new
|
||||
for i in self
|
||||
out.push(i)
|
||||
end
|
||||
return out
|
||||
end
|
||||
end
|
||||
list=Find.find('in')
|
||||
l=list.collect
|
||||
case ARGV.first
|
||||
when "doc"
|
||||
for i in l do
|
||||
next if ignore.include?(i) or /\.v.html/.match?(i)
|
||||
if /\.(txti|org|md|html)$/.match?(i)
|
||||
print i
|
||||
print ' ' unless i==l.last
|
||||
end
|
||||
end
|
||||
for i in l do
|
||||
next if ignore.include?(i) or /\.v.html/.match?(i)
|
||||
if /\.(txti|org|md|html)$/.match?(i)
|
||||
print i
|
||||
print ' ' unless i==l.last
|
||||
end
|
||||
end
|
||||
when "sass"
|
||||
for i in l do
|
||||
next if ignore.include?(i)
|
||||
if /\.s[ac]ss$/.match?(i)
|
||||
print i
|
||||
print ' ' unless i==l.last
|
||||
end
|
||||
end
|
||||
for i in l do
|
||||
next if ignore.include?(i)
|
||||
if /\.s[ac]ss$/.match?(i)
|
||||
print i
|
||||
print ' ' unless i==l.last
|
||||
end
|
||||
end
|
||||
when "dir"
|
||||
for i in l do
|
||||
next if ignore.include?(i)
|
||||
if File.directory?(i)
|
||||
print i
|
||||
print ' ' unless i==l.last
|
||||
end
|
||||
end
|
||||
for i in l do
|
||||
next if ignore.include?(i)
|
||||
if File.directory?(i)
|
||||
print i
|
||||
print ' ' unless i==l.last
|
||||
end
|
||||
end
|
||||
when "rest"
|
||||
for i in l do
|
||||
next if ignore.include?(i)
|
||||
unless /\.(s[ac]ss|txti|org|md)$/.match?(i) or File.directory(i)
|
||||
print i
|
||||
print ' ' unless i==l.last
|
||||
end
|
||||
end
|
||||
for i in l do
|
||||
next if ignore.include?(i)
|
||||
unless /\.(s[ac]ss|txti|org|md)$/.match?(i) or File.directory(i)
|
||||
print i
|
||||
print ' ' unless i==l.last
|
||||
end
|
||||
end
|
||||
else
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user