Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 129 lines (102 sloc) 3.433 kB
16da347 - Hobix.gemspec: for anyone who wants to make a Gem.
_why authored
1 require 'base64'
b03054d - make-go.rb: installation of share goods. version sniffing
_why authored
2 require 'yaml'
3
4 def check_hobix_version( path, version )
5 installed = nil
6 hobixfile = File.join( path, 'hobix.rb' )
7 if File.exists? hobixfile
8 File.open( hobixfile ) do |f|
9 f.grep( /VERSION\s+=\s+'([^']+)'/ ) do |line|
10 installed = $1
11 end
12 end
13 end
14 installed
15 end
ad02fa1 - version: 0.2f
_why authored
16 def dir_to_base64( *dirs )
17 attached = {}
18 dirs.collect do |dirglob|
19 Dir.glob(dirglob)
20 end.flatten.each do |item|
21 next if item.include?("CVS") or File.directory? item
22 attached[item.gsub( /^.*(lib|bin|share)\//, '\1/' )] = Base64::encode64( File.read( item ) )
23 end
24 attached
16da347 - Hobix.gemspec: for anyone who wants to make a Gem.
_why authored
25 end
e3742c9 make-go.rb: share nuke warning. yaml update. elephant.
_why authored
26 attached = dir_to_base64( '../RedCloth-3.0.3/lib/redcloth.rb', 'lib/**/*.rb', 'bin/**/*', 'share/**/*' )
16da347 - Hobix.gemspec: for anyone who wants to make a Gem.
_why authored
27 hobix_install_yaml =<<EOY
b03054d - make-go.rb: installation of share goods. version sniffing
_why authored
28 version: #{ check_hobix_version( 'lib', 'hobix.rb' ) }
16da347 - Hobix.gemspec: for anyone who wants to make a Gem.
_why authored
29 setup:
30 - - welcome
31 - |-
32 #
e3742c9 make-go.rb: share nuke warning. yaml update. elephant.
_why authored
33 _
34 . ()_'() ``,``-`-`. (*`
35 * ( ) , \\` .
36 __ _. ( ^ ^ ) `' .` _ __ __
37 / ^ ^ ) ( .,___, ,;/ ^ `'
38 ````````` U| |U . | |. |^`````````
39 >_` -| |^ | |^ |
40 `---' ^^^' ^^^'
16da347 - Hobix.gemspec: for anyone who wants to make a Gem.
_why authored
41
e3742c9 make-go.rb: share nuke warning. yaml update. elephant.
_why authored
42 you slow elephant.
16da347 - Hobix.gemspec: for anyone who wants to make a Gem.
_why authored
43
e3742c9 make-go.rb: share nuke warning. yaml update. elephant.
_why authored
44 but you got hobix.
45
46 ahee.
16da347 - Hobix.gemspec: for anyone who wants to make a Gem.
_why authored
47
48 # halloo!! ready to install the very latest hobix??
49 # DON'T BE 'FRAIDY!! nothing scary AT ALL!! (hobix is
50 # whizzzy cool and /everyone/ is holding your hand.)
51
52 + ready to go + [Y/n] ?
53
ad02fa1 - version: 0.2f
_why authored
54 - - sitelibdir
16da347 - Hobix.gemspec: for anyone who wants to make a Gem.
_why authored
55 - |
56 # where would you like to install the libraries??
57 # the default is your ruby site libs dir, which is
58 # CONFIG['sitelibdir']
59
60 + lib path [ENTER for default] +
61
ad02fa1 - version: 0.2f
_why authored
62 - - bindir
16da347 - Hobix.gemspec: for anyone who wants to make a Gem.
_why authored
63 - |
64 # where would you like to install the hobix
65 # command-line tool?? the default is
66 # CONFIG['bindir']
67
68 + cmd path [ENTER for default] +
69
ad02fa1 - version: 0.2f
_why authored
70 - - sharedir
5b0a525 - lib/hobix/out/quick.rb: absolute links.
_why authored
71 - |
72 # where would you like to install the hobix
73 # accessory data?? (this includes the default
74 # blogging templates.) the default is
ad02fa1 - version: 0.2f
_why authored
75 # CONFIG['sharedir']
5b0a525 - lib/hobix/out/quick.rb: absolute links.
_why authored
76
77 + share path [ENTER for default] +
78
16da347 - Hobix.gemspec: for anyone who wants to make a Gem.
_why authored
79 - - sucmd
80 - |-
81 # will you be using su or sudo?? this way you can
82 # install hobix without being logged in as root.
83 # (windows users: skip this step!!)
84
85 + su or sudo + [su/sudo/NONE] ?
86
87 - - installing
88 - |-
89 # here's your setup options
90
91 CONF
92
93 + all set + [Yn] ?
94
b03054d - make-go.rb: installation of share goods. version sniffing
_why authored
95 - - setup
96 - |-
97 # brilliant, it's all installed. would you like to setup your hobix
98 # configuration now?? (if not, you can use `hobix setup_blogs' at your
99 # convenience.
100
101 + setup your blogs + [Yn] ?
102
16da347 - Hobix.gemspec: for anyone who wants to make a Gem.
_why authored
103 - - complete
104 - |
105 # your hobix installation is complete!! to get
106 # started, type `hobix'. if the command-line
107 # tool is in your path, you should see a list of
108 # hobix actions!! (here are you configs again:)
109
110 CONF
111
b03054d - make-go.rb: installation of share goods. version sniffing
_why authored
112 # See hobix.com for a tutorial on using your new Hobix blogs!! And
113 # when you have your blog up, let everybody know at let.us.all.hobix.com,
114 # okay?? great, thanks.
115
e3742c9 make-go.rb: share nuke warning. yaml update. elephant.
_why authored
116 ---
16da347 - Hobix.gemspec: for anyone who wants to make a Gem.
_why authored
117 EOY
118
119 hobix_install_yaml += attached.to_yaml( :UseBlock => true, :UseFold => false )
120
440c9ca - install.rb: proper installation of share dir.
_why authored
121 File.open( 'go/hobix-install.yaml', 'w' ) do |hiy|
16da347 - Hobix.gemspec: for anyone who wants to make a Gem.
_why authored
122 hiy << hobix_install_yaml
123 end
ad02fa1 - version: 0.2f
_why authored
124
125 win32_att = dir_to_base64( 'win32/lib/**/*' )
126 File.open( 'go/hobix-install-win32.yaml', 'w' ) do |hiw|
127 hiw << win32_att.to_yaml( :UseBlock => true, :UseFold => false )
128 end
Something went wrong with that request. Please try again.