Skip to content

Commit

Permalink
script simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
terrywbrady committed Aug 29, 2024
1 parent 480f6f9 commit 481c492
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions makefile.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

dir = '/tmp/datapath'
%x[mkdir -p #{dir}]
if ARGV.length >= 2
File.open("#{dir}/#{ARGV[0]}", 'w') do |f|
f.write(' ' * ARGV[1].to_i)
end
end
`mkdir -p #{dir}`
File.write("#{dir}/#{ARGV[0]}", ' ' * ARGV[1].to_i) if ARGV.length >= 2

0 comments on commit 481c492

Please sign in to comment.