summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorFrederico Linhares <fred@linhares.blue>2023-05-30 15:23:26 -0300
committerFrederico Linhares <fred@linhares.blue>2023-05-30 15:23:26 -0300
commit341a669921023845ec55dd1f3c8738d16f37d3ec (patch)
treee4e7fefb6e776ede22ae69c2823da83aced3205c /Rakefile
parent7f7515f22517509fb93ee1615c72006dca6abb03 (diff)
feat Create 2D animations
* Rakefile: Add subfolders to the lib directory. * lib/animation/discrete.rb: Create a class for discrete animations. This class needs tests. * lib/animation/frame_2d.rb: Create a 2D frame to be used with discrete animations
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index c2e67d2..042eac2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -40,7 +40,7 @@ CPP_FILES = FileList[
CPP_OBJS = CPP_FILES.ext('.o')
RB_LIBS = FileList[
- 'lib/*.rb'
+ 'lib/**/*.rb'
]
GLSL_FILES = FileList[
@@ -160,7 +160,11 @@ task install: :build do
# Install libs
`install -d #{destdir}#{DATA_DIR}/lib`
- RB_LIBS.each {`install #{_1} #{destdir}#{DATA_DIR}/lib`}
+ RB_LIBS.each do |path|
+ subdir = /(\/[[:alnum:]]+)\//.match(path)&.captures&.at(0)
+ `install -d #{destdir}#{DATA_DIR}/lib#{subdir}` unless subdir.nil?
+ `install #{path} #{destdir}#{DATA_DIR}/lib#{subdir}`
+ end
end
task default: %[build]