Skip to content

Commit

Permalink
Adding dos2unix to support windows generated *.sh files.
Browse files Browse the repository at this point in the history
  • Loading branch information
rHorsey committed Jun 14, 2017
1 parent d88cb7c commit 7dc6836
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RUN sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 &
ca-certificates \
curl \
default-jdk \
dos2unix \
imagemagick \
gdebi-core \
git \
Expand Down
3 changes: 2 additions & 1 deletion server/app/workers/run_simulate_data_point.rb
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,10 @@ def initialize_worker
File.open(receipt_file, 'w') { |f| f << Time.now }
end

# Run the server data_point initialization script with defined arguments, if it exists.
# Run the server data_point initialization script with defined arguments, if it exists. Convert CRLF if required
begin
Timeout.timeout(600) do
exec("find #{analysis_dir}/scripts -type f -print0 | xargs -0 dos2unix")
files = Dir.glob("#{analysis_dir}/scripts/worker_initialization/*").select { |f| !f.match(/.*args$/) }.map { |f| File.basename(f) }
files.each do |f|
@sim_logger.info "Found data point initialization file #{f}."
Expand Down

0 comments on commit 7dc6836

Please sign in to comment.