Revision 7238,
653 bytes
checked in by daisuke, 12 years ago
(diff) |
import emacsen-common
|
Line | |
---|
1 | #!/usr/bin/ruby |
---|
2 | |
---|
3 | #prefix = "/home/xtakei/cvs/emacsen-common/apel-sample" |
---|
4 | prefix ="/" |
---|
5 | |
---|
6 | # variables |
---|
7 | |
---|
8 | # installed emacs |
---|
9 | flavors = Array.new |
---|
10 | |
---|
11 | # installed elisp package |
---|
12 | elpackages = Array.new |
---|
13 | |
---|
14 | lib_dir = prefix+"/usr/lib/emacsen-common" |
---|
15 | var_dir = prefix+"/var/lib/emacsen-common" |
---|
16 | |
---|
17 | |
---|
18 | action = "install" |
---|
19 | |
---|
20 | if $0 =~ /remove/ |
---|
21 | then |
---|
22 | action = "remove" |
---|
23 | end |
---|
24 | |
---|
25 | actionscript = lib_dir+"/packages/"+action+"/"+ARGV[0] |
---|
26 | print "actionscript:"+actionscript+"\n" |
---|
27 | |
---|
28 | def getflavors(var_dir = "/") |
---|
29 | return open(var_dir+"/installed-flavors").readlines |
---|
30 | end |
---|
31 | |
---|
32 | flavors = getflavors(var_dir) |
---|
33 | |
---|
34 | flavors.each{ |flavor| |
---|
35 | system("EPREFIX=#{prefix} #{actionscript} #{flavor}") |
---|
36 | } |
---|
37 | |
---|
Note: See
TracBrowser
for help on using the repository browser.