forked from larsyencken/marelle-deps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrake.pl
48 lines (43 loc) · 1.18 KB
/
drake.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
%
% drake.pl
% computer-deps
%
% A make replacement in Clojure.
%
command_pkg(drake).
meet(drake, _).
depends(drake, _, ['java', '__drake executable set up']).
git_step('__drake checked out',
'https://github.com/Factual/drake',
'~/.computer/drake'
).
pkg('__drake built').
met('__drake built', _) :-
isfile('~/.computer/drake/target/drake.jar').
meet('__drake built', _) :-
bash('cd ~/.computer/drake && ~/.computer/bin/lein uberjar').
depends('__drake built', _, [
'leiningen',
'__drake checked out'
]).
pkg('__drake executable set up').
met('__drake executable set up', _) :- isfile('~/.computer/bin/drake').
meet('__drake executable set up', _) :-
expand_path('~/.computer/bin/drake', F),
tell(F),
writeln('#!/bin/bash'),
writeln('exec ~/.computer/bin/drip -cp ~/.computer/drake/target/drake.jar drake.core "$@"'),
told,
make_executable(F).
depends('__drake executable set up', _, [
'__drake built',
drip
]).
pkg(drip).
met(drip, _) :- isfile('~/.computer/bin/drip').
meet(drip, _) :-
curl(
'https://raw.github.com/flatland/drip/master/bin/drip',
'~/.computer/bin/drip'
),
bash('chmod a+x ~/.computer/bin/drip').