Skip to content
This repository has been archived by the owner on Apr 12, 2019. It is now read-only.

Commit

Permalink
rake install task enhanced to allow run reiac, leex and yecc from any…
Browse files Browse the repository at this point in the history
… location
  • Loading branch information
Phil Pirj committed Nov 21, 2008
1 parent 534543f commit 3d5480d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,15 @@ task :install do
rm_r reia_dir if File.exist?(reia_dir)
mkdir reia_dir

%w[LICENSE README ebin src lib].each { |f| cp_r f, reia_dir }
%w[LICENSE README bin/reiac bin/erlc bin/leex bin/yecc ebin src lib].each { |f| cp_r f, reia_dir }

mkdir "/usr/local/bin" unless File.exist?("/usr/local/bin")

File.open("/usr/local/bin/reia", "w") { |f| f << "erl -noshell +K true -s Loader start $* -s init stop" }
File.open("/usr/local/bin/ire", "w") { |f| f << "erl +K true -noshell -noinput -s ire init" }

File.chmod 0755, "/usr/local/bin/ire", "/usr/local/bin/reia"
%w[bin/reiac bin/leex bin/yecc].each { |f| cp_r f, "/usr/local/bin" }

File.chmod 0755, "/usr/local/bin/ire", "/usr/local/bin/reia", "/usr/local/bin/reiac", "/usr/local/bin/leex", "/usr/local/bin/yecc"
end

task :clean do
Expand Down

0 comments on commit 3d5480d

Please sign in to comment.