This commit is contained in:
BoHung Chiu 2022-03-29 15:24:10 +08:00
parent c572a51431
commit 119c963d82
1 changed files with 3 additions and 1 deletions

View File

@ -13,7 +13,9 @@ if bundle_update_flag
default_event_news_widget_info = JSON.parse(File.read("#{app_path}/modules/event_news_mod/info.json"))["widgets"].sort_by{|h| h["filename"].to_i} rescue []
all_template.each do |folder|
if !folder.include?('mobile')
if Dir.exist?("#{folder}modules/event_news_mod/event_news")
if Dir.exist?("#{folder}modules/event_news")
Bundler.with_clean_env{system ("cp -rf #{folder}modules/event_news #{folder}modules/event_news_mod && rm -rf #{folder}modules/event_news")}
elsif Dir.exist?("#{folder}modules/event_news_mod/event_news")
Bundler.with_clean_env{system ("cp -rf #{folder}modules/event_news_mod/event_news/* #{folder}modules/event_news_mod/. && rm -rf #{folder}modules/event_news_mod/event_news")}
end
info_json_file = "#{folder}modules/event_news_mod/info.json"