Skip to content

Commit

Permalink
Install maps from submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillerDragon committed Nov 28, 2020
1 parent abbf97e commit 4a5b9a6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "maps"]
path = maps
url = https://github.com/chichilku/chichilku3-maps
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ chichilku3
## Download the source

```
git clone https://github.com/chichilku/chichilku3
git clone --recursive https://github.com/chichilku/chichilku3
cd chichilku3
bundle install
```
Expand Down
3 changes: 2 additions & 1 deletion chichilku3.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Gem::Specification.new do |s|
'lib/client/img/stick128/noarms/*.png',
'lib/client/img/bow64/*.png',
'client.json',
'server.json'
'server.json',
'maps'
]
s.add_dependency 'gosu', '~> 0.15.2'
s.add_dependency 'os', '~> 1.0.1'
Expand Down
8 changes: 7 additions & 1 deletion lib/share/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@ def initialize(console, file)
puts "path: " + @chichilku3_dir
FileUtils.mkdir_p @chichilku3_dir
FileUtils.mkdir_p "#{@chichilku3_dir}recordings"
FileUtils.mkdir_p "#{@chichilku3_dir}maps"
FileUtils.mkdir_p "#{@chichilku3_dir}maps_b64"
FileUtils.mkdir_p "#{@chichilku3_dir}downloadedmaps"
FileUtils.mkdir_p "#{@chichilku3_dir}tmp"
unless File.directory? "#{@chichilku3_dir}maps"
if File.directory? "maps"
FileUtils.cp_r "maps", "#{@chichilku3_dir}maps"
else
FileUtils.mkdir_p "#{@chichilku3_dir}maps"
end
end
create_default_cfg(file, "#{@chichilku3_dir}/#{file}")
@source_file = file
@file = @chichilku3_dir + file
Expand Down
1 change: 1 addition & 0 deletions maps
Submodule maps added at 25713e

0 comments on commit 4a5b9a6

Please sign in to comment.