/
install.scm
41 lines (33 loc) · 1.1 KB
/
install.scm
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
(use file.util)
(use gauche.process)
(define *panna-directory*
(if (sys-getenv "OLUTPANIMO")
(sys-getenv "OLUTPANIMO")
(build-path (home-directory)
".panna")))
(define install
(lambda ()
(print "cloning repository")
(run-process `(git clone git://github.com/mytoh/panna ,*panna-directory*) :wait #t)
; (print "creating bin/ directory")
; (make-directory*
; (build-path *panna-directory*
; "bin"))
(print "creating riisi directory")
(make-directory*
(build-path *panna-directory*
"riisi"))
(print "make executable")
(run-process `(chmod +x ,(build-path *panna-directory* "bin/panna")) :wait #t)
(newline)
(print " .-----.---.-.-----.-----.---.-." )
(print " | _ | _ | | | _ |" )
(print " | __|___._|__|__|__|__|___._|" )
(print " |_| package manager " )
))
(define (main args)
(cond
((file-exists? (build-path (home-directory) ".panna"))
`(format #f "please remove %s directory" ,(sys-getenv "OLUTPANIMO")))
(else
(install))))