forked from ggml-org/whisper.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextsources.rb
More file actions
57 lines (55 loc) · 1.09 KB
/
extsources.rb
File metadata and controls
57 lines (55 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
require "pathname"
root = Pathname("..")/".."
ignored_dirs = %w[
.devops
.github
ci
examples/addon.node
examples/bench.wasm
examples/command
examples/command.wasm
examples/lsp
examples/main
examples/python
examples/stream
examples/stream.wasm
examples/sycl
examples/talk-llama
examples/wchess
examples/whisper.android
examples/whisper.android.java
examples/whisper.nvim
examples/whisper.objc
examples/whisper.swiftui
examples/whisper.wasm
grammars
models
samples
scripts
tests
].collect {|dir| root/dir}
ignored_files = %w[
AUTHORS
Makefile
.gitignore
.gitmodules
.dockerignore
]
ignored_exts = %w[
.yml
.sh
.md
.py
.js
.nvim
]
EXTSOURCES =
`git ls-files -z #{root}`.split("\x0")
.collect {|file| Pathname(file)}
.reject {|file|
ignored_exts.include?(file.extname) ||
ignored_files.include?(file.basename.to_path) ||
ignored_dirs.any? {|dir| file.descend.any? {|desc| desc == dir}} ||
(file.descend.to_a[1] != root && file != Pathname("..")/"javascript"/"package-tmpl.json")
}
.collect(&:to_path)